UNPKG

@appello/eslint-config

Version:

Appello's ESLint config

115 lines (98 loc) 3.08 kB
module.exports = { extends: [ 'plugin:@typescript-eslint/recommended', 'plugin:css-modules/recommended', 'airbnb', 'airbnb-typescript', 'airbnb/hooks', 'prettier', ], plugins: ['@typescript-eslint', 'unused-imports', 'simple-import-sort', 'prettier', 'css-modules'], parser: '@typescript-eslint/parser', parserOptions: { ecmaVersion: 2021, sourceType: 'module', project: './tsconfig.json', }, rules: { '@typescript-eslint/dot-notation': 'off', '@typescript-eslint/no-shadow': 'off', '@typescript-eslint/no-use-before-define': 'off', // typescript '@typescript-eslint/array-type': ['error', { default: 'array' }], '@typescript-eslint/no-empty-interface': 'off', "@typescript-eslint/object-curly-spacing": ["error", "always"], "@typescript-eslint/explicit-function-return-type": "off", "@typescript-eslint/explicit-module-boundary-types": "off", '@typescript-eslint/naming-convention': "off", 'no-plusplus': 'off', 'arrow-body-style': 'off', "no-restricted-exports": "off", "no-nested-ternary": "off", // imports routine 'sort-imports': 'off', 'import/order': 'off', 'simple-import-sort/imports': 'error', 'simple-import-sort/exports': 'error', 'unused-imports/no-unused-imports-ts': 'error', 'import/no-duplicates': 'off', 'import/no-cycle': 'off', // allow only named exports for IDEs autocomplete 'import/prefer-default-export': 'off', 'import/no-default-export': 'error', // react 'react/no-array-index-key': 'off', 'react/jsx-key': [ 'error', { checkFragmentShorthand: true, }, ], 'react/no-unescaped-entities': 'off', 'react-hooks/exhaustive-deps': 'warn', 'react/require-default-props': 'off', 'react/jsx-props-no-spreading': 'off', 'react/prop-types': 'off', 'react/jsx-filename-extension': [ 'error', { extensions: ['.tsx', '.jsx'], }, ], 'react/function-component-definition': [ 'error', { namedComponents: 'arrow-function', }, ], "react/jsx-no-useless-fragment": "off", "react/destructuring-assignment": "off", "react/no-unstable-nested-components": "off", "react/sort-default-props": ["error", { "ignoreCase": false }], "react/jsx-sort-props": ["error", { "callbacksLast": true, "shorthandFirst": true, "ignoreCase": false }], 'prefer-destructuring': 'off', 'prettier/prettier': 'error', // css modules "css-modules/no-unused-class": "error", "css-modules/no-undef-class": "error", // immer uses reassign 'no-param-reassign': 'off', // use optional chaining instead '@typescript-eslint/no-non-null-assertion': 'error', 'max-classes-per-file': 'off', 'global-require': 'off', 'no-console': 'error', // JSX change "jsx-a11y/anchor-is-valid": "off", "jsx-a11y/control-has-associated-label": "off", }, settings: { 'import/resolver': { typescript: {}, }, }, };