@intersect.mbo/govtool-delegation-pillar
Version:
Delegation Pillar of the GovTool project
108 lines (102 loc) • 3.09 kB
JavaScript
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:storybook/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jest/recommended',
'airbnb',
'plugin:prettier/recommended',
],
plugins: ['@typescript-eslint', 'react', 'jest', 'prettier'],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
project: './tsconfig.json',
files: ['*.ts', '*.tsx'],
},
rules: {
'array-callback-return': 'off',
curly: 'off',
indent: 'off',
quotes: 'off',
semi: ['error', 'always'],
'linebreak-style': ['error', 'unix'],
'no-redeclare': 'off',
'no-undef': 'off',
'no-prototype-builtins': 'off',
'nonblock-statement-body-position': 'off',
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'comma-dangle': 'off',
'operator-linebreak': 'off',
'implicit-arrow-linebreak': 'off',
'consistent-return': 'off',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-shadow': 'off',
'function-paren-newline': 'off',
'object-curly-newline': 'off',
'@typescript-eslint/no-shadow': ['error'],
'@typescript-eslint/no-redeclare': ['error'],
'@typescript-eslint/no-unused-vars': ['error'],
'import/prefer-default-export': 'off',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['**/*.stories.{ts,tsx}', '**/*.test.{ts,tsx}'],
},
],
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'react/display-name': 'off',
'react/jsx-curly-newline': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }],
'react/jsx-fragments': 'off',
'react/jsx-no-bind': 'warn',
'react/jsx-no-useless-fragment': 'off',
'react/jsx-wrap-multilines': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-uses-react': 'error',
'react/jsx-one-expression-per-line': 'off',
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'react/function-component-definition': [
'error',
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
'react/require-default-props': 'off',
// temporary
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'no-console': 'warn',
'no-nested-ternary': 'off',
'react/no-unused-prop-types': 'warn',
'react-hooks/exhaustive-deps': 'off',
},
ignorePatterns: [
'setupTests.ts',
'.eslintrc.cjs',
'jest.config.cjs',
'.storybook/',
'dist/',
'node_modules/',
'rollup.config.mjs',
],
};