Skip to content

Instantly share code, notes, and snippets.

@veremey
Last active May 28, 2022 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veremey/18f96eda58fbb6136b02f56a431af49a to your computer and use it in GitHub Desktop.
Save veremey/18f96eda58fbb6136b02f56a431af49a to your computer and use it in GitHub Desktop.
.eslintrc
module.exports = {
parser: 'babel-eslint',
extends: ['airbnb-base', 'plugin:jest/recommended', 'react-app', 'plugin:css-import-order/recommended'],
plugins: ['prefer-arrow', 'unicorn', 'css-import-order'],
rules: {
'no-var': 0,
indent: [1, 4, { SwitchCase: 1 }],
'no-multi-spaces': 1,
'no-confusing-arrow': 'off',
'no-unused-vars': [
'warn',
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
ignoreRestSiblings: false,
caughtErrors: 'all',
varsIgnorePattern: '^_',
},
],
semi: ['error', 'never'],
quotes: ['warn', 'single'],
'prefer-const': 'error',
'arrow-parens': ['warn', 'always'],
'no-plusplus': 'off',
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
'no-sequences': 'warn',
'no-await-in-loop': 'off',
'no-restricted-syntax': 'off',
'no-use-before-define': [
'error',
{
functions: false,
classes: true,
variables: false,
},
],
'object-shorthand': 'warn',
'react/jsx-quotes': 0,
'jsx-quotes': ['warn', 'prefer-double'],
// 'prefer-arrow/prefer-arrow-functions': [
// 'warn',
// {
// disallowPrototype: true,
// singleReturnOnly: false,
// classPropertiesAllowed: false,
// },
// ],
// 'unicorn/filename-case': [
// 'warn',
// { case: 'kebabCase' },
// ],
'unicorn/catch-error-name': ['error', { name: 'error', caughtErrorsIgnorePattern: '^_' }],
'unicorn/no-fn-reference-in-iterator': 'off',
'unicorn/import-index': 'off',
'import/no-cycle': 'off',
'max-len': 0,
'import/prefer-default-export': 0,
'no-param-reassign': 0,
'vars-on-top': 0,
'no-shadow': 0,
'consistent-return': 0,
'class-methods-use-this': 0,
radix: 0,
'brace-style': ['error', '1tbs'],
curly: ['error', 'all'],
'import/no-unresolved': 'off',
'import/no-self-import': 'error',
'import/newline-after-import': ['error', { count: 1 }],
'import/order': [
'warn',
{
groups: ['builtin', ['external', 'parent', 'index', 'sibling'], 'unknown'],
pathGroups: [
{
pattern: '*.+(svg|png|jpeg|jpg|webp|gif|ico)*(?*)',
patternOptions: {
dot: true,
nocomment: true,
matchBase: true,
},
group: 'unknown',
position: 'after',
},
{
pattern: '*.scss',
group: 'unknown',
patternOptions: { matchBase: true },
position: 'after',
},
],
pathGroupsExcludedImportTypes: [],
'newlines-between': 'always',
},
],
'import/extensions': 'off',
'react/jsx-tag-spacing': 1,
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment