@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 CHANGED
@@ -6,4 +6,4 @@
6
6
  "node": true
7
7
  },
8
8
  "extends": "./index.js"
9
- }
9
+ }
@@ -11,4 +11,4 @@
11
11
  "Typescript",
12
12
  "Json"
13
13
  ]
14
- }
14
+ }
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-eslint.json" ], // Specify it only for TypeScript files
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.1",
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
- 2, {
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": [ "error", "^[a-zA-Z0-9_-]+$" ], // Nome do arquivo igual export default
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
  {
@@ -13,7 +13,6 @@ module.exports = {
13
13
  "no-unused-expressions": [ "off" ],
14
14
  "import/unambiguous": [ "off" ],
15
15
  "filenames/match-regex": [ "off" ],
16
- "eol-last": [ "error", "never" ],
17
16
  },
18
17
  },
19
18
  {
package/src/test.ts ADDED
@@ -0,0 +1,11 @@
1
+ // Test File example
2
+
3
+ export class TestClass {
4
+
5
+ public constructor(
6
+ public name: string,
7
+ ) {
8
+
9
+ }
10
+
11
+ }
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
- "paths": {
16
- "~/*": [ "source/*" ]
17
- },
18
- "removeComments": true,
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
- "./node_modules/@types",
27
- "./source/@types"
28
- ]
10
+ "./src/@types",
11
+ "node_modules/@types"
12
+ ],
13
+ "types": [ "node" ]
29
14
  },
30
- "exclude": [ "node_modules" ],
31
- "include": [ "source/**/*" ]
32
- }
15
+ "exclude": [ "./coverage/" ],
16
+ "extends": "@odg/tsconfig/tsconfig.node.json",
17
+ "include": [ "." ]
18
+ }
@@ -1,4 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "include": [ "./" ]
4
- }