@odg/eslint-config 0.9.1 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +1 -1
- package/.vscode/settings.json +1 -1
- package/index.js +3 -1
- package/package.json +3 -1
- package/rules/javascript/best-practices.js +6 -2
- package/rules/json/base.js +0 -1
- package/src/test.ts +11 -0
- package/tsconfig.json +12 -26
- package/tsconfig-eslint.json +0 -4
package/.eslintrc
CHANGED
package/.vscode/settings.json
CHANGED
package/index.js
CHANGED
|
@@ -48,6 +48,8 @@ module.exports = {
|
|
|
48
48
|
"tmp/",
|
|
49
49
|
|
|
50
50
|
"**/*.min.*",
|
|
51
|
+
"package-lock.json",
|
|
52
|
+
"yarn.lock",
|
|
51
53
|
],
|
|
52
54
|
settings: {
|
|
53
55
|
"html/report-bad-indent": "error",
|
|
@@ -95,7 +97,7 @@ module.exports = {
|
|
|
95
97
|
},
|
|
96
98
|
ecmaVersion: 2022,
|
|
97
99
|
sourceType: "module",
|
|
98
|
-
project: [ "tsconfig.json", "tsconfig
|
|
100
|
+
project: [ "tsconfig.json", "@odg/tsconfig/tsconfig.json" ], // Specify it only for TypeScript files
|
|
99
101
|
},
|
|
100
102
|
},
|
|
101
103
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odg/eslint-config",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "Linter for JavaScript And Typescript project",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Dragons Gamers <https://www.linkedin.com/in/victor-alves-odgodinho>",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"devDependencies": {
|
|
14
|
+
"@types/node": "^16",
|
|
14
15
|
"typescript": "*"
|
|
15
16
|
},
|
|
16
17
|
"peerDependencies": {
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
},
|
|
19
20
|
"dependencies": {
|
|
20
21
|
"@babel/core": "*",
|
|
22
|
+
"@odg/tsconfig": "*",
|
|
21
23
|
"@typescript-eslint/eslint-plugin": "*",
|
|
22
24
|
"@typescript-eslint/parser": "*",
|
|
23
25
|
"eslint": "*",
|
|
@@ -67,7 +67,7 @@ module.exports = {
|
|
|
67
67
|
} ], // Requer espaço apos try {}
|
|
68
68
|
"space-before-blocks": [ "error" ], // Requer espaço antes das chaves
|
|
69
69
|
"space-unary-ops": [
|
|
70
|
-
|
|
70
|
+
"error", {
|
|
71
71
|
words: true, // Espaço apos Await e palavras chaves
|
|
72
72
|
nonwords: false, // Força nao ter espaço antes de operadores unários !, -, +
|
|
73
73
|
overrides: {
|
|
@@ -230,7 +230,11 @@ module.exports = {
|
|
|
230
230
|
"error",
|
|
231
231
|
"^[a-zA-Z][a-zA-Z0-9_-]+((\\.[a-z]+)?)+$",
|
|
232
232
|
], // Nome de arquivo deve ser alfanumérico
|
|
233
|
-
"filenames/match-exported": [
|
|
233
|
+
"filenames/match-exported": [
|
|
234
|
+
"error",
|
|
235
|
+
"^[a-zA-Z0-9_-]+$",
|
|
236
|
+
"\\.[a-z]+$",
|
|
237
|
+
], // Nome do arquivo igual export default
|
|
234
238
|
"unicorn/catch-error-name": [
|
|
235
239
|
"error",
|
|
236
240
|
{
|
package/rules/json/base.js
CHANGED
package/src/test.ts
ADDED
package/tsconfig.json
CHANGED
|
@@ -1,32 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"allowJs": true,
|
|
4
3
|
"baseUrl": ".",
|
|
5
|
-
"emitDecoratorMetadata": true,
|
|
6
|
-
"esModuleInterop": true,
|
|
7
|
-
"experimentalDecorators": true,
|
|
8
|
-
"forceConsistentCasingInFileNames": true,
|
|
9
|
-
"lib": [
|
|
10
|
-
"es6",
|
|
11
|
-
"ES2021"
|
|
12
|
-
],
|
|
13
|
-
"module": "commonjs",
|
|
14
4
|
"outDir": "./dist",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"resolveJsonModule": true,
|
|
20
|
-
"rootDir": "./source",
|
|
21
|
-
"skipLibCheck": true,
|
|
22
|
-
"sourceMap": true,
|
|
23
|
-
"strictNullChecks": true,
|
|
24
|
-
"target": "es2018",
|
|
5
|
+
"rootDirs": [
|
|
6
|
+
".",
|
|
7
|
+
"./src"
|
|
8
|
+
],
|
|
25
9
|
"typeRoots": [
|
|
26
|
-
"./
|
|
27
|
-
"
|
|
28
|
-
]
|
|
10
|
+
"./src/@types",
|
|
11
|
+
"node_modules/@types"
|
|
12
|
+
],
|
|
13
|
+
"types": [ "node" ]
|
|
29
14
|
},
|
|
30
|
-
"exclude": [ "
|
|
31
|
-
"
|
|
32
|
-
|
|
15
|
+
"exclude": [ "./coverage/" ],
|
|
16
|
+
"extends": "@odg/tsconfig/tsconfig.node.json",
|
|
17
|
+
"include": [ "." ]
|
|
18
|
+
}
|
package/tsconfig-eslint.json
DELETED