Skip to content

Commit d333195

Browse files
committed
chore: switch to default eslint setup
1 parent c93df50 commit d333195

File tree

6 files changed

+114
-206
lines changed

6 files changed

+114
-206
lines changed

.eslintrc.json

Lines changed: 9 additions & 167 deletions
Original file line numberDiff line numberDiff line change
@@ -9,55 +9,14 @@
99
"@nrwl/nx/enforce-module-boundaries": [
1010
"error",
1111
{
12-
"allow": ["@nx-example/shared/product/data/testing"],
12+
"enforceBuildableLibDependency": true,
13+
"allow": [],
1314
"depConstraints": [
1415
{
15-
"sourceTag": "type:app",
16-
"onlyDependOnLibsWithTags": ["type:feature", "type:ui"]
17-
},
18-
{
19-
"sourceTag": "type:feature",
20-
"onlyDependOnLibsWithTags": [
21-
"type:ui",
22-
"type:data",
23-
"type:types",
24-
"type:state"
25-
]
26-
},
27-
{
28-
"sourceTag": "type:types",
29-
"onlyDependOnLibsWithTags": ["type:types"]
30-
},
31-
{
32-
"sourceTag": "type:state",
33-
"onlyDependOnLibsWithTags": [
34-
"type:state",
35-
"type:types",
36-
"type:data"
37-
]
38-
},
39-
{
40-
"sourceTag": "type:data",
41-
"onlyDependOnLibsWithTags": ["type:types"]
42-
},
43-
{
44-
"sourceTag": "type:e2e",
45-
"onlyDependOnLibsWithTags": ["type:e2e-utils"]
46-
},
47-
{
48-
"sourceTag": "type:ui",
49-
"onlyDependOnLibsWithTags": ["type:types", "type:ui"]
50-
},
51-
{
52-
"sourceTag": "scope:products",
53-
"onlyDependOnLibsWithTags": ["scope:products", "scope:shared"]
54-
},
55-
{
56-
"sourceTag": "scope:cart",
57-
"onlyDependOnLibsWithTags": ["scope:cart", "scope:shared"]
16+
"sourceTag": "*",
17+
"onlyDependOnLibsWithTags": ["*"]
5818
}
59-
],
60-
"enforceBuildableLibDependency": true
19+
]
6120
}
6221
]
6322
}
@@ -73,128 +32,11 @@
7332
"rules": {}
7433
},
7534
{
76-
"files": ["*.ts"],
77-
"rules": {
78-
"@angular-eslint/component-selector": [
79-
"error",
80-
{
81-
"type": "element",
82-
"prefix": "app",
83-
"style": "kebab-case"
84-
}
85-
],
86-
"@angular-eslint/directive-selector": [
87-
"error",
88-
{
89-
"type": "attribute",
90-
"prefix": "app",
91-
"style": "camelCase"
92-
}
93-
],
94-
"@angular-eslint/no-conflicting-lifecycle": "error",
95-
"@angular-eslint/no-host-metadata-property": "error",
96-
"@angular-eslint/no-input-rename": "error",
97-
"@angular-eslint/no-inputs-metadata-property": "error",
98-
"@angular-eslint/no-output-native": "error",
99-
"@angular-eslint/no-output-on-prefix": "error",
100-
"@angular-eslint/no-output-rename": "error",
101-
"@angular-eslint/no-outputs-metadata-property": "error",
102-
"@angular-eslint/use-lifecycle-interface": "error",
103-
"@angular-eslint/use-pipe-transform-interface": "error",
104-
"@typescript-eslint/consistent-type-definitions": "error",
105-
"@typescript-eslint/no-explicit-any": "off",
106-
"@typescript-eslint/no-namespace": "off",
107-
"@typescript-eslint/dot-notation": "off",
108-
"@typescript-eslint/explicit-member-accessibility": [
109-
"off",
110-
{
111-
"accessibility": "explicit"
112-
}
113-
],
114-
"@typescript-eslint/member-ordering": "error",
115-
"@typescript-eslint/naming-convention": "warn",
116-
"@typescript-eslint/no-empty-function": "off",
117-
"@typescript-eslint/no-empty-interface": "error",
118-
"@typescript-eslint/no-inferrable-types": [
119-
"error",
120-
{
121-
"ignoreParameters": true
122-
}
123-
],
124-
"@typescript-eslint/no-misused-new": "error",
125-
"@typescript-eslint/no-non-null-assertion": "error",
126-
"@typescript-eslint/no-shadow": [
127-
"error",
128-
{
129-
"hoist": "all"
130-
}
131-
],
132-
"@typescript-eslint/no-unused-expressions": "error",
133-
"@typescript-eslint/prefer-function-type": "error",
134-
"@typescript-eslint/unified-signatures": "error",
135-
"arrow-body-style": "error",
136-
"constructor-super": "error",
137-
"eqeqeq": ["error", "smart"],
138-
"guard-for-in": "error",
139-
"id-blacklist": "off",
140-
"id-match": "off",
141-
"import/no-deprecated": "warn",
142-
"import/order": "error",
143-
"no-bitwise": "error",
144-
"no-caller": "error",
145-
"no-console": [
146-
"error",
147-
{
148-
"allow": [
149-
"log",
150-
"warn",
151-
"dir",
152-
"timeLog",
153-
"assert",
154-
"clear",
155-
"count",
156-
"countReset",
157-
"group",
158-
"groupEnd",
159-
"table",
160-
"dirxml",
161-
"error",
162-
"groupCollapsed",
163-
"Console",
164-
"profile",
165-
"profileEnd",
166-
"timeStamp",
167-
"context"
168-
]
169-
}
170-
],
171-
"no-debugger": "error",
172-
"no-empty": "off",
173-
"no-eval": "error",
174-
"no-fallthrough": "error",
175-
"no-new-wrappers": "error",
176-
"no-restricted-imports": ["error", "rxjs/Rx"],
177-
"no-throw-literal": "error",
178-
"no-undef-init": "error",
179-
"no-underscore-dangle": "off",
180-
"no-var": "error",
181-
"prefer-const": "error",
182-
"radix": "error"
183-
},
184-
"plugins": [
185-
"eslint-plugin-import",
186-
"@angular-eslint/eslint-plugin",
187-
"@typescript-eslint"
188-
]
189-
},
190-
{
191-
"files": ["*.html"],
192-
"rules": {
193-
"@angular-eslint/template/banana-in-box": "error",
194-
"@angular-eslint/template/no-negated-async": "error",
195-
"@angular-eslint/template/eqeqeq": "error"
35+
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
36+
"env": {
37+
"jest": true
19638
},
197-
"plugins": ["@angular-eslint/eslint-plugin-template"]
39+
"rules": {}
19840
}
19941
]
20042
}

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"angular.ng-template",
55
"ms-vscode.vscode-typescript-tslint-plugin",
66
"esbenp.prettier-vscode",
7-
"firsttris.vscode-jest-runner"
7+
"firsttris.vscode-jest-runner",
8+
"dbaeumer.vscode-eslint"
89
]
910
}

libs/shared/header/src/lib/header/header.element.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ enum HeaderElementAttribute {
55
}
66

77
declare global {
8+
// eslint-disable-next-line @typescript-eslint/no-namespace
89
namespace JSX {
910
interface IntrinsicElements {
1011
'nx-example-header': JSXify<HeaderElement>;

libs/shared/product/ui/src/lib/product-price/product-price.element.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ enum ProductPriceElementAttribute {
55
}
66

77
declare global {
8+
// eslint-disable-next-line @typescript-eslint/no-namespace
89
namespace JSX {
910
interface IntrinsicElements {
1011
'nx-example-product-price': JSXify<ProductPriceElement>;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
"eslint": "8.15.0",
9090
"eslint-config-prettier": "8.1.0",
9191
"eslint-plugin-cypress": "^2.10.3",
92+
"eslint-plugin-import": "^2.26.0",
9293
"eslint-plugin-jsx-a11y": "6.6.0",
9394
"eslint-plugin-react": "7.31.8",
9495
"eslint-plugin-react-hooks": "4.6.0",
@@ -106,4 +107,3 @@
106107
"typescript": "4.8.4"
107108
}
108109
}
109-

0 commit comments

Comments
 (0)