UNPKG

1.82 kBJavaScriptView Raw
1module.exports = {
2 env: {
3 es6: true,
4 browser: true,
5 node: true,
6 },
7 extends: ['airbnb'],
8 plugins: [
9 'babel',
10 'import',
11 'jsx-a11y',
12 'react',
13 'prettier',
14 ],
15 parser: 'babel-eslint',
16 parserOptions: {
17 ecmaVersion: 6,
18 sourceType: 'module',
19 ecmaFeatures: {
20 jsx: true
21 }
22 },
23 rules: {
24 'linebreak-style': 'off', // Don't play nicely with Windows.
25
26 'arrow-parens': 'off', // Incompatible with prettier
27 'object-curly-newline': 'off', // Incompatible with prettier
28 'no-mixed-operators': 'off', // Incompatible with prettier
29 'arrow-body-style': 'off', // Not our taste?
30 'function-paren-newline': 'off', // Incompatible with prettier
31 'no-plusplus': 'off',
32 'space-before-function-paren': 0, // Incompatible with prettier
33
34 'max-len': ['error', 100, 2, { ignoreUrls: true, }], // airbnb is allowing some edge cases
35 'no-console': 'error', // airbnb is using warn
36 'no-alert': 'error', // airbnb is using warn
37
38 'no-param-reassign': 'off', // Not our taste?
39 "radix": "off", // parseInt, parseFloat radix turned off. Not my taste.
40
41 'react/require-default-props': 'off', // airbnb use error
42 'react/forbid-prop-types': 'off', // airbnb use error
43 'react/jsx-filename-extension': ['error', { extensions: ['.js'] }], // airbnb is using .jsx
44
45 'prefer-destructuring': 'off',
46
47 'react/no-find-dom-node': 'off', // I don't know
48 'react/no-did-mount-set-state': 'off',
49 'react/no-unused-prop-types': 'off', // Is still buggy
50 'react/jsx-one-expression-per-line': 'off',
51
52 "jsx-a11y/anchor-is-valid": ["error", { "components": ["Link"], "specialLink": ["to"] }],
53 "jsx-a11y/label-has-for": [2, {
54 "required": {
55 "every": ["id"]
56 }
57 }], // for nested label htmlFor error
58
59 'prettier/prettier': ['error'],
60 },
61};
\No newline at end of file