eslint-config-novacredit
Version:
Nova Credit's configuration for style
80 lines (75 loc) • 2.27 kB
JavaScript
;
const path = require('path');
module.exports = {
extends: [path.join(__dirname, 'common.js'), 'prettier', 'prettier/react'],
parser: 'babel-eslint',
plugins: ['babel', 'react-hooks'],
rules: {
'arrow-parens': 0,
'babel/semi': 1,
camelcase: 'warn',
'class-methods-use-this': [
'error',
{
exceptMethods: [
'render',
'getChildContext',
'componentWillMount',
'componentDidMount',
'componentWillReceiveProps',
'shouldComponentUpdate',
'componentWillUpdate',
'componentDidUpdate',
'componentWillUnmount',
'getSnapshotBeforeUpdate',
'UNSAFE_componentWillReceiveProps',
'componentDidCatch',
],
},
],
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'only-multiline',
},
],
'function-paren-newline': 0,
'implicit-arrow-linebreak': 0,
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
'no-confusing-arrow': 0,
'no-param-reassign': [2, { props: false }],
'object-curly-newline': 0,
'operator-linebreak': 0,
'prefer-destructuring': 0,
'jsx-a11y/accessible-emoji': 0,
'jsx-a11y/anchor-is-valid': 0,
'jsx-a11y/click-events-have-key-events': 0,
'jsx-a11y/label-has-associated-control': 0,
'jsx-a11y/label-has-for': 0,
'jsx-a11y/mouse-events-have-key-events': 0,
'jsx-a11y/no-redundant-roles': 0,
'jsx-a11y/no-static-element-interactions': 0,
'jsx-a11y/no-autofocus': 0,
'jsx-a11y/no-noninteractive-element-interactions': 0,
'react/jsx-closing-bracket-location': 'warn',
'react/jsx-filename-extension': 0,
'react/jsx-indent': 0,
'react/jsx-indent-props': 0,
'react/jsx-wrap-multilines': ['warn', { logical: 'ignore', prop: 'ignore' }],
'react/default-props-match-prop-types': 0,
'react/destructuring-assignment': 0,
'react/forbid-prop-types': [1, { forbid: ['any'] }],
'react/prefer-stateless-function': 0,
'react/prop-types': 'warn',
'react/no-multi-comp': 1,
'react/no-typos': 0,
'react/no-unused-prop-types': 'warn',
'react/self-closing-comp': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
};