|
| 1 | +// This configuration only applies to the package manager root. |
| 2 | +/** @type {import("eslint").Linter.Config} */ |
1 | 3 | module.exports = { |
2 | | - env: { |
3 | | - browser: true, |
4 | | - es6: true, |
5 | | - }, |
6 | | - extends: ['react-app', 'plugin:react/recommended', 'airbnb', 'prettier'], |
| 4 | + ignorePatterns: ['apps/**', 'packages/**'], |
| 5 | + extends: ['@repo/eslint-config/library.js'], |
7 | 6 | parser: '@typescript-eslint/parser', |
8 | 7 | parserOptions: { |
9 | | - ecmaFeatures: { |
10 | | - jsx: true, |
11 | | - }, |
12 | | - ecmaVersion: 12, |
13 | | - sourceType: 'module', |
14 | | - }, |
15 | | - plugins: ['react', '@typescript-eslint', 'prettier'], |
16 | | - settings: { |
17 | | - 'import/resolver': { |
18 | | - node: { |
19 | | - extensions: ['.js', '.jsx', '.ts', '.tsx'], |
20 | | - }, |
21 | | - }, |
22 | | - }, |
23 | | - // https://github.com/typescript-eslint/typescript-eslint/blob/main/docs/linting/TROUBLESHOOTING.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors |
24 | | - overrides: [ |
25 | | - { |
26 | | - files: ['*.ts', '*.mts', '*.cts', '*.tsx'], |
27 | | - rules: { |
28 | | - 'no-undef': 'off', |
29 | | - }, |
30 | | - }, |
31 | | - ], |
32 | | - rules: { |
33 | | - 'prettier/prettier': 'warn', |
34 | | - 'no-shadow': 'warn', |
35 | | - 'no-unused-vars': 'off', |
36 | | - radix: 'off', |
37 | | - '@typescript-eslint/no-unused-vars': 'warn', |
38 | | - // For optional chaining to not create linting errors |
39 | | - 'no-unused-expressions': 'off', |
40 | | - 'arrow-body-style': 'off', |
41 | | - 'import/extensions': 'off', |
42 | | - 'import/no-extraneous-dependencies': 'off', |
43 | | - 'import/order': 'off', |
44 | | - 'import/newline-after-import': 'warn', |
45 | | - 'import/prefer-default-export': 'off', |
46 | | - 'no-use-before-define': 'off', |
47 | | - '@typescript-eslint/no-use-before-define': 'warn', |
48 | | - 'react/jsx-curly-newline': 'off', |
49 | | - 'react/jsx-tag-spacing': 'warn', |
50 | | - 'react/button-has-type': 'warn', |
51 | | - 'react/jsx-filename-extension': [ |
52 | | - 'warn', |
53 | | - { extensions: ['.js', '.jsx', '.ts', '.tsx'] }, |
54 | | - ], |
55 | | - 'react/jsx-one-expression-per-line': 'off', |
| 8 | + project: true, |
56 | 9 | }, |
57 | 10 | }; |
0 commit comments