|
| 1 | +// eslint-disable-next-line no-undef |
| 2 | +module.exports = { |
| 3 | + extends: [ |
| 4 | + 'plugin:react/recommended', |
| 5 | + '@skan-io/eslint-config-base' |
| 6 | + ], |
| 7 | + |
| 8 | + parser: 'babel-eslint', |
| 9 | + parserOptions: { |
| 10 | + ecmaVersion: 2018, |
| 11 | + sourceType: 'module', |
| 12 | + ecmaFeatures: { |
| 13 | + jsx: true, |
| 14 | + impliedStrict: true |
| 15 | + } |
| 16 | + }, |
| 17 | + |
| 18 | + plugins: ['babel', 'react'], |
| 19 | + |
| 20 | + rules: { |
| 21 | + /* annoying to have to escape */ |
| 22 | + 'react/no-unescaped-entities': 'off', |
| 23 | + 'react/jsx-indent': ['error', 2], |
| 24 | + 'react/jsx-indent-props': ['error', 2], |
| 25 | + 'react/jsx-wrap-multilines': ['error'], |
| 26 | + 'react/jsx-tag-spacing': ['error', {beforeSelfClosing: 'always'}], |
| 27 | + |
| 28 | + 'react/jsx-pascal-case': ['error'], |
| 29 | + 'react/jsx-no-target-blank': ['error'], |
| 30 | + 'react/jsx-no-comment-textnodes': ['error'], |
| 31 | + 'react/jsx-no-duplicate-props': ['error', {ignoreCase: true}], |
| 32 | + // not sure about using <p>{'spam'}</p> |
| 33 | + // 'react/jsx-no-literals': ['error'], |
| 34 | + 'react/jsx-no-bind': ['error', { |
| 35 | + ignoreRefs: false, |
| 36 | + allowArrowFunctions: true, |
| 37 | + allowBind: false |
| 38 | + }], |
| 39 | + // 'react/jsx-key': ['error'], |
| 40 | + 'react/jsx-handler-names': ['error'], |
| 41 | + 'react/jsx-first-prop-new-line': ['error', 'multiline'], |
| 42 | + 'react/jsx-equals-spacing': ['error', 'never'], |
| 43 | + 'react/jsx-curly-spacing': [2, 'never'] |
| 44 | + } |
| 45 | +}; |
0 commit comments