|
1 | 1 | {
|
2 | 2 | "root": true,
|
3 |
| - "parser": "@typescript-eslint/parser", |
4 |
| - "parserOptions": { |
5 |
| - "ecmaVersion": 2018, |
6 |
| - "sourceType": "module", |
7 |
| - "project": "./tsconfig.*?.json" |
8 |
| - }, |
9 |
| - "ignorePatterns": [ |
10 |
| - "**/*" |
11 |
| - ], |
12 |
| - "plugins": [ |
13 |
| - "@typescript-eslint", |
14 |
| - "@nrwl/nx" |
15 |
| - ], |
16 |
| - "extends": [ |
17 |
| - "eslint:recommended", |
18 |
| - "plugin:@typescript-eslint/eslint-recommended", |
19 |
| - "plugin:@typescript-eslint/recommended", |
20 |
| - "prettier", |
21 |
| - "prettier/@typescript-eslint" |
22 |
| - ], |
23 |
| - "rules": { |
24 |
| - "@typescript-eslint/no-inferrable-types": "off", |
25 |
| - "@typescript-eslint/explicit-member-accessibility": "off", |
26 |
| - "@typescript-eslint/explicit-module-boundary-types": "off", |
27 |
| - "@typescript-eslint/explicit-function-return-type": "off", |
28 |
| - "@typescript-eslint/no-parameter-properties": "off", |
29 |
| - "@nrwl/nx/enforce-module-boundaries": [ |
30 |
| - "error", |
31 |
| - { |
32 |
| - "enforceBuildableLibDependency": true, |
33 |
| - "allow": [], |
34 |
| - "depConstraints": [ |
| 3 | + "ignorePatterns": ["**/*"], |
| 4 | + "plugins": ["@nrwl/nx"], |
| 5 | + "overrides": [ |
| 6 | + { |
| 7 | + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], |
| 8 | + "rules": { |
| 9 | + "semi": ["warn", "never"], |
| 10 | + "@nrwl/nx/enforce-module-boundaries": [ |
| 11 | + "error", |
35 | 12 | {
|
36 |
| - "sourceTag": "*", |
37 |
| - "onlyDependOnLibsWithTags": [ |
38 |
| - "*" |
| 13 | + "enforceBuildableLibDependency": true, |
| 14 | + "allow": ["@danone-global/internal/react/testing"], |
| 15 | + "depConstraints": [ |
| 16 | + { |
| 17 | + "sourceTag": "*", |
| 18 | + "onlyDependOnLibsWithTags": ["*"] |
| 19 | + } |
39 | 20 | ]
|
40 | 21 | }
|
41 | 22 | ]
|
42 | 23 | }
|
43 |
| - ] |
44 |
| - }, |
45 |
| - "overrides": [ |
| 24 | + }, |
46 | 25 | {
|
47 |
| - "files": [ |
48 |
| - "**/*.spec.js", |
49 |
| - "**/*.spec.jsx", |
50 |
| - "**/*.spec.ts", |
51 |
| - "**/*.spec.tsx" |
52 |
| - ], |
53 |
| - "env": { |
54 |
| - "jest": true |
| 26 | + "files": ["*.ts", "*.tsx"], |
| 27 | + "extends": ["plugin:@nrwl/nx/typescript"], |
| 28 | + "parserOptions": { |
| 29 | + "project": "./tsconfig.*?.json" |
| 30 | + }, |
| 31 | + "rules": { |
| 32 | + "no-unneeded-ternary": ["error"], |
| 33 | + "no-nested-ternary": ["error"], |
| 34 | + "multiline-ternary": ["error", "always-multiline"], |
| 35 | + "operator-linebreak": ["error", "before"] |
55 | 36 | }
|
56 | 37 | },
|
57 | 38 | {
|
58 |
| - "files": [ |
59 |
| - "*.tsx" |
60 |
| - ], |
| 39 | + "files": ["*.tsx"], |
61 | 40 | "rules": {
|
62 |
| - "@typescript-eslint/no-unused-vars": "off" |
| 41 | + "react/jsx-max-props-per-line": [ |
| 42 | + "warn", |
| 43 | + { "maximum": 1, "when": "always" } |
| 44 | + ], |
| 45 | + "react/jsx-first-prop-new-line": ["warn", "multiline"], |
| 46 | + "react/jsx-indent-props": ["warn", 2] |
63 | 47 | }
|
| 48 | + }, |
| 49 | + { |
| 50 | + "files": ["*.js", "*.jsx"], |
| 51 | + "extends": ["plugin:@nrwl/nx/javascript"] |
64 | 52 | }
|
65 | 53 | ]
|
66 | 54 | }
|
0 commit comments