To install eslint and plugins do:
npm install -g eslint@2.2.0 babel-eslint eslint-plugin-react eslint-plugin-import eslint-import-resolver-webpack
| --- | |
| parser: babel-eslint | |
| parserOptions: | |
| ecmaVersion: 6 | |
| sourceType: "module" | |
| ecmaFeatures: | |
| jsx: true | |
| plugins: | |
| - react | |
| env: | |
| browser: true | |
| es6: true | |
| extends: | |
| - "eslint:recommended" | |
| - "plugin:react/recommended" | |
| - "plugin:import/errors" | |
| - "plugin:import/warnings" | |
| rules: | |
| no-console: 0 | |
| comma-dangle: [2, "only-multiline"] | |
| no-inner-declarations: 0 | |
| no-unused-vars: [2, {argsIgnorePattern: "^(nextState|prevState|err|error|reject|getState)$"}] | |
| no-use-before-define: [2, {functions: false}] | |
| no-trailing-spaces: 2 | |
| react/no-did-update-set-state: [1] | |
| react/no-did-mount-set-state: [1] | |
| react/no-unused-prop-types: [1] | |
| react/jsx-no-bind: [1] | |
| import/no-duplicates: 0 | |
| globals: | |
| module: true | |
| modules: true | |
| require: true | |
| settings: | |
| import/resolver: | |
| webpack: | |
| config: 'webpack.config.js' | |
| import/ignore: | |
| # these prevent "No default export found in module" on webpack'ed modules | |
| - node_modules | |
| - \.(scss|less|css)$ # can't parse unprocessed CSS modules | |
| - \.(svg|png)$ # can't parse images |