@yamato-daiwa/style_guides 0.0.0 → 0.0.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/BasicPreset.js CHANGED
@@ -1,5 +1,6 @@
1
1
  const ECMA_ScriptBasicRules = require("./Partials/ECMA_ScriptBasicRules.js")
2
2
  const TypeScriptOverridings = require("./Partials/Overridings/TypeScriptOverridings");
3
+ const TestFilesOverridings = require("./Partials/Overridings/TestFilesOverridings.js")
3
4
 
4
5
 
5
6
  module.exports = {
@@ -28,7 +29,8 @@ module.exports = {
28
29
  },
29
30
 
30
31
  overrides: [
31
- TypeScriptOverridings
32
+ TypeScriptOverridings,
33
+ TestFilesOverridings
32
34
  ],
33
35
 
34
36
  globals: {
@@ -77,6 +77,7 @@ module.exports = {
77
77
 
78
78
 
79
79
  /* --- Prevention of the confusing / Stupid errors ---------------------------------------------------------------- */
80
+ "no-constant-binary-expression": "error",
80
81
  "no-self-assign": "error",
81
82
  "no-self-compare": "error",
82
83
  "no-sparse-arrays": "error",
@@ -88,8 +89,7 @@ module.exports = {
88
89
  "default-param-last": "error",
89
90
  "func-names": [ "error", "always" ],
90
91
  "func-style": [ "error", "declaration" ],
91
- "init-declarations": [ "warn", "always" ],
92
- "new-cap": [ "error" ],
92
+ "new-cap": [ "error", { capIsNew: false } ],
93
93
  "no-array-constructor": "error",
94
94
  "no-bitwise": "error",
95
95
  "no-confusing-arrow": [ "error", { allowParens: true } ],
@@ -247,12 +247,12 @@ module.exports = {
247
247
  properties: "never",
248
248
  exceptions: [
249
249
  "add",
250
- "ID",
250
+ "id",
251
251
  "key",
252
- "pug",
253
252
  "Pug",
254
- "vue",
255
- "Vue"
253
+ "pug",
254
+ "Vue",
255
+ "vue"
256
256
  ]
257
257
  }
258
258
  ],
@@ -0,0 +1,12 @@
1
+ module.exports = {
2
+ "files": [
3
+ "*.test.ts"
4
+ ],
5
+ "rules": {
6
+
7
+ "max-nested-callbacks": "off",
8
+
9
+ "no-magic-numbers": "off",
10
+ "@typescript-eslint/no-magic-numbers": "off"
11
+ }
12
+ };
@@ -97,13 +97,12 @@ module.exports = {
97
97
  "default-param-last": "off",
98
98
  "@typescript-eslint/default-param-last": "error",
99
99
 
100
- "init-declarations": "off",
101
- "@typescript-eslint/init-declarations": "error",
102
-
103
100
  "@typescript-eslint/no-array-constructor": "error",
104
101
 
105
102
  "@typescript-eslint/no-confusing-void-expression": "error",
106
103
 
104
+ "@typescript-eslint/no-duplicate-enum-values": "error",
105
+
107
106
  "no-invalid-this": "off",
108
107
  "@typescript-eslint/no-invalid-this": "error",
109
108
 
@@ -219,7 +218,7 @@ module.exports = {
219
218
  ],
220
219
 
221
220
  "no-duplicate-imports": "off",
222
- "@typescript-eslint/no-duplicate-imports": "error",
221
+ "import/no-duplicates": "error",
223
222
 
224
223
  "no-empty-function": "off",
225
224
  "@typescript-eslint/no-empty-function": "error",
@@ -368,10 +367,10 @@ module.exports = {
368
367
 
369
368
  "@typescript-eslint/no-require-imports": "error",
370
369
 
371
- "@typescript-eslint/prefer-for-of": "error",
370
+ "@typescript-eslint/prefer-for-of": "error"
372
371
 
373
372
 
374
373
  /* --- Experimental --------------------------------------------------------------------------------------------- */
375
- "@typescript-eslint/prefer-readonly-parameter-types": "warn"
374
+ // "@typescript-eslint/prefer-readonly-parameter-types": "warn"
376
375
  }
377
376
  };
@@ -0,0 +1,29 @@
1
+ module.exports = {
2
+
3
+ files: [
4
+ "*.vue",
5
+ "*.vue.ts"
6
+ ],
7
+
8
+ parser: "vue-eslint-parser",
9
+
10
+ parserOptions: {
11
+ parser: "@typescript-eslint/parser",
12
+ project: "tsconfig.json",
13
+ extraFileExtensions: [ ".vue" ],
14
+ tsconfigRootDir: "./"
15
+ },
16
+
17
+ rules: {
18
+ "class-methods-use-this": "off",
19
+ "@typescript-eslint/indent": "off",
20
+ "@typescript-eslint/member-ordering": "off",
21
+ "vue/script-indent": [
22
+ "warn",
23
+ 2,
24
+ {
25
+ baseIndent: 1
26
+ }
27
+ ]
28
+ }
29
+ };
@@ -0,0 +1,10 @@
1
+ module.exports = {
2
+
3
+ "files": [
4
+ "**/*.vuex.ts"
5
+ ],
6
+
7
+ "rules": {
8
+ "@typescript-eslint/member-ordering": "off"
9
+ }
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamato-daiwa/style_guides",
3
- "version": "0.0.0",
3
+ "version": "0.0.3",
4
4
  "description": "The guidelines for ESLint, Pug and Stylus.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,21 +16,15 @@
16
16
  ],
17
17
  "license": "MIT",
18
18
  "devDependencies": {
19
- "typescript": "4.6.3"
19
+ "eslint-plugin-vue-pug": "0.4.3",
20
+ "typescript": "4.6.4"
20
21
  },
21
22
  "dependencies": {
22
- "@typescript-eslint/eslint-plugin": "5.19.0",
23
- "@typescript-eslint/parser": "5.19.0",
24
- "eslint": "8.13.0",
23
+ "@typescript-eslint/eslint-plugin": "5.25.0",
24
+ "@typescript-eslint/parser": "5.25.0",
25
+ "eslint": "8.16.0",
25
26
  "eslint-plugin-node": "11.1.0"
26
27
  },
27
- "peerDependencies": {
28
- "@typescript-eslint/eslint-plugin": "^5.18.0",
29
- "@typescript-eslint/parser": "^5.18.0",
30
- "eslint": "^8.13.0",
31
- "eslint-plugin-node": "^11.1.0",
32
- "typescript": ">=4.0.0 <4.7.0"
33
- },
34
28
  "files": [
35
29
  "BasicPreset.js",
36
30
  "Partials"