@wavesenterprise/eslint-config

0.3.8 • Public • Published

Waves Enterprise Esling configuration

Install

npm i -D eslint @wavesenterprise/eslint-config

Use

// .eslintrc.js

// react + typescript + javascript
module.exports = {
  parserOptions: {
    project: './tsconfig.json',
    babelOptions: {
      configFile: './babel.config.js'
    }
  },
  extends: [
    '@wavesenterprise/eslint-config/typescript-mixed',
    '@wavesenterprise/eslint-config/react',
  ]
};

// pure typescript
module.exports = {
  parserOptions: {
    project: './tsconfig.json',
  },
  extends: [
    '@wavesenterprise/eslint-config/typescript-pure',
  ]
};

// pure javascript
module.exports = {
  parserOptions: {
    babelOptions: {
      configFile: './babel.config.js'
    }
  },
  extends: [
    '@wavesenterprise/eslint-config/base',
  ]
};

Extend @wavesenterprise/eslint-config/typescript-mixed if your project uses typescript AND javascript

Extend @wavesenterprise/eslint-config/typescript-pure if your project uses ONLY typescript

Extend @wavesenterprise/eslint-config/base if your project uses ONLY javascript

Extend @wavesenterprise/eslint-config/react if your project uses React

If typescript-mixed or base configs are extended you MUST install @babel/core package to support @babel/eslint-parser plugin. Also, path to babel config file should be set at parserOptions.babelOptions.configFile

If typescript-mixed or typescript-pure configs are extended parserOptions.project MUST be set to match tsconfig.json file. All linted files MUST be included or listed in tsconfig.json.

Readme

Keywords

none

Package Sidebar

Install

npm i @wavesenterprise/eslint-config

Weekly Downloads

36

Version

0.3.8

License

MIT

Unpacked Size

12.6 kB

Total Files

9

Last publish

Collaborators

  • stfy
  • sergeymart
  • nbugaev
  • wavesadmin
  • aklyavlin
  • dimalitvinov
  • mikhail.milekhin