UNPKG

@linguala/eslint-config

Version:

Shareable config for linguala frontend projects

91 lines (90 loc) 2.05 kB
module.exports = { env: { browser: true, commonjs: true, es6: true, 'jest/globals': true, node: true, }, parser: '@babel/eslint-parser', parserOptions: { requireConfigFile: false, sourceType: 'module', ecmaFeatures: { jsx: true, }, ecmaVersion: 2020, babelOptions: { presets: ['@babel/preset-react'], }, }, extends: [ 'eslint:recommended', 'standard', 'plugin:jest/recommended', 'plugin:react/recommended', 'plugin:import/errors', 'plugin:import/warnings', 'plugin:prettier/recommended', ], plugins: [ 'jest', 'standard', 'react', 'prettier', 'react-hooks', 'sort-exports', ], rules: { 'jest/expect-expect': 'off', 'jest/no-disabled-tests': 'warn', 'jest/no-done-callback': 'off', 'jest/no-focused-tests': 'error', 'jest/no-identical-title': 'error', 'jest/no-test-callback': 'off', 'jest/prefer-to-have-length': 'warn', 'jest/valid-expect': 'error', 'prettier/prettier': [ 'error', { arrowParens: 'avoid', }, ], 'react/prop-types': 0, 'react/display-name': 0, 'react/react-in-jsx-scope': 0, 'no-nested-ternary': 0, 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', semi: ['error', 'never'], 'comma-dangle': ['error', 'only-multiline'], 'arrow-parens': ['error', 'as-needed'], 'jsx-quotes': [2, 'prefer-double'], 'no-tabs': 1, 'no-mixed-spaces-and-tabs': 1, 'no-useless-escape': 1, 'no-undef': 1, 'no-console': 2, 'import/order': [ 1, { 'newlines-between': 'always', }, ], 'sort-imports': [ 1, { ignoreCase: false, ignoreDeclarationSort: true, ignoreMemberSort: false, memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], }, ], 'sort-exports/sort-exports': ['error', { sortDir: 'asc' }], }, settings: { react: { version: '17.0', }, }, }