@looker/eslint-config-oss
TypeScript icon, indicating that this package has built-in type declarations

1.7.21 • Public • Published

@looker/eslint-config-oss

This repository provides shared configuration for tooling used in Typescript/Javascript projects in development as part of the @looker/components

It provides configurations for:

  • ESLint (Javascript & Typescript linter)
  • Prettier (Javascript & Typescript code-formatter)

We've included support for React & Styled Components in our configurations as they're very commonly used in Looker Typescript projects.

Installation

The default export contains all default Airbnb ESLint rules, including ECMAScript 6+, and the ones listed below. It requires some peerDependencies as well.

Install the package with

yarn add @looker/eslint-config-oss eslint -D

Usage

ESLint

Add the config to either your package.json:

{
  "eslintConfig": {
    "extends": ["@looker/eslint-config-oss"]
  }
}

to your eslint.config.js (or .eslintrc.js):

module.exports = {
  extends: ['@looker/eslint-config-oss'],
}

NOTE: Adding an eslint.config.js file will allow you to add your own rules to so that your package can add (or disable) additional lint rules as needed:

module.exports = {
  extends: ['@looker/eslint-config-oss'],
  rules: {
    /* @TODO - To level-up our code quality we shouldn't ever use `any` */
    '@typescript-eslint/no-explicit-any': 'off',
  },
}

Prettier

Need to customize the prettier configuration? Add a .prettierrc.json to the root of your repository:

{
  "$schema": "http://json.schemastore.org/prettierrc",
  "semi": false,
  "singleQuote": true
}

LICENCE

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @looker/eslint-config-oss

Weekly Downloads

80

Version

1.7.21

License

MIT

Unpacked Size

59.2 kB

Total Files

18

Last publish

Collaborators

  • drstrangelooker
  • guyellis
  • looker-ops
  • scullin
  • jkaster
  • looker-open-source
  • fabio-looker
  • bryans99
  • mdodgelooker
  • dbchristopher
  • google-wombot