@cabloy/lint 4.0.0 → 4.0.2

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/api/eslint.js CHANGED
@@ -1,91 +1,4 @@
1
- const rules = {
2
- '@typescript-eslint/no-explicit-any': 'off',
3
- 'prefer-const': [
4
- 'error',
5
- {
6
- destructuring: 'all',
7
- ignoreReadBeforeAssign: true,
8
- },
9
- ],
10
- 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
11
- 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
12
- 'max-len': [
13
- 'error',
14
- {
15
- code: 120,
16
- ignoreComments: true,
17
- ignoreTrailingComments: true,
18
- ignoreUrls: true,
19
- ignoreStrings: true,
20
- ignoreTemplateLiterals: true,
21
- ignoreRegExpLiterals: true,
22
- },
23
- ],
24
- 'no-undef': [
25
- 'error',
26
- {
27
- typeof: false,
28
- },
29
- ],
30
- 'array-bracket-spacing': ['error', 'never'],
31
- 'no-empty': [
32
- 'error',
33
- {
34
- allowEmptyCatch: true,
35
- },
36
- ],
37
- 'no-empty-function': [
38
- 'error',
39
- {
40
- allow: [
41
- 'functions',
42
- 'arrowFunctions',
43
- 'generatorFunctions',
44
- 'methods',
45
- 'generatorMethods',
46
- 'getters',
47
- 'setters',
48
- 'constructors',
49
- 'asyncFunctions',
50
- 'asyncMethods',
51
- ],
52
- },
53
- ],
54
- 'no-constant-condition': [
55
- 'error',
56
- {
57
- checkLoops: false,
58
- },
59
- ],
60
- 'one-var-declaration-per-line': [0],
61
- 'space-before-function-paren': [
62
- 'error',
63
- {
64
- anonymous: 'always',
65
- named: 'never',
66
- asyncArrow: 'always',
67
- },
68
- ],
69
- 'generator-star-spacing': [0],
70
- 'newline-per-chained-call': [0],
71
- 'vue/multi-word-component-names': [0],
72
- '@typescript-eslint/no-var-requires': 'off',
73
- '@typescript-eslint/no-unused-vars': [
74
- 'error',
75
- {
76
- argsIgnorePattern: '^_',
77
- },
78
- ],
79
- '@typescript-eslint/no-this-alias': 'off',
80
- '@typescript-eslint/no-unsafe-declaration-merging': 'off',
81
- '@typescript-eslint/ban-ts-comment': [
82
- 'error',
83
- {
84
- 'ts-expect-error': 'allow-with-description',
85
- 'ts-ignore': 'allow-with-description',
86
- },
87
- ],
88
- };
1
+ const rules = require('../common/rules.js');
89
2
 
90
3
  module.exports = {
91
4
  parser: '@typescript-eslint/parser',
@@ -0,0 +1,108 @@
1
+ const rules = {
2
+ 'prefer-promise-reject-errors': 'off',
3
+ quotes: ['warn', 'single', { avoidEscape: true }],
4
+ // this rule, if on, would require explicit return type on the `render` function
5
+ '@typescript-eslint/explicit-function-return-type': 'off',
6
+ 'vue/multi-word-component-names': 'off',
7
+ 'vue/prefer-import-from-vue': 'off',
8
+ '@typescript-eslint/no-namespace': 'off',
9
+
10
+ '@typescript-eslint/no-explicit-any': 'off',
11
+ 'prefer-const': [
12
+ 'error',
13
+ {
14
+ destructuring: 'all',
15
+ ignoreReadBeforeAssign: true,
16
+ },
17
+ ],
18
+ 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
19
+ 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
20
+ 'max-len': [
21
+ 'error',
22
+ {
23
+ code: 120,
24
+ ignoreComments: true,
25
+ ignoreTrailingComments: true,
26
+ ignoreUrls: true,
27
+ ignoreStrings: true,
28
+ ignoreTemplateLiterals: true,
29
+ ignoreRegExpLiterals: true,
30
+ },
31
+ ],
32
+ 'no-undef': [
33
+ 'error',
34
+ {
35
+ typeof: false,
36
+ },
37
+ ],
38
+ 'array-bracket-spacing': ['error', 'never'],
39
+ 'no-empty': [
40
+ 'error',
41
+ {
42
+ allowEmptyCatch: true,
43
+ },
44
+ ],
45
+ 'no-empty-function': [
46
+ 'error',
47
+ {
48
+ allow: [
49
+ 'functions',
50
+ 'arrowFunctions',
51
+ 'generatorFunctions',
52
+ 'methods',
53
+ 'generatorMethods',
54
+ 'getters',
55
+ 'setters',
56
+ 'constructors',
57
+ 'asyncFunctions',
58
+ 'asyncMethods',
59
+ ],
60
+ },
61
+ ],
62
+ 'no-constant-condition': [
63
+ 'error',
64
+ {
65
+ checkLoops: false,
66
+ },
67
+ ],
68
+ 'one-var-declaration-per-line': [0],
69
+ 'space-before-function-paren': [
70
+ 'error',
71
+ {
72
+ anonymous: 'always',
73
+ named: 'never',
74
+ asyncArrow: 'always',
75
+ },
76
+ ],
77
+ 'generator-star-spacing': [0],
78
+ 'newline-per-chained-call': [0],
79
+ 'vue/multi-word-component-names': [0],
80
+ '@typescript-eslint/no-var-requires': 'off',
81
+ '@typescript-eslint/no-unused-vars': [
82
+ 'error',
83
+ {
84
+ argsIgnorePattern: '^_',
85
+ },
86
+ ],
87
+ '@typescript-eslint/no-this-alias': 'off',
88
+ '@typescript-eslint/no-unsafe-declaration-merging': 'off',
89
+ '@typescript-eslint/ban-ts-comment': [
90
+ 'error',
91
+ {
92
+ 'ts-expect-error': 'allow-with-description',
93
+ 'ts-ignore': 'allow-with-description',
94
+ },
95
+ ],
96
+ '@typescript-eslint/ban-types': [
97
+ 'error',
98
+ {
99
+ types: {
100
+ // un-ban a type that's banned by default
101
+ '{}': false,
102
+ },
103
+ extendDefaults: true,
104
+ },
105
+ ],
106
+ };
107
+
108
+ module.exports = rules;
package/front/eslint.js CHANGED
@@ -1,91 +1,4 @@
1
- const rules = {
2
- '@typescript-eslint/no-explicit-any': 'off',
3
- 'prefer-const': [
4
- 'error',
5
- {
6
- destructuring: 'all',
7
- ignoreReadBeforeAssign: true,
8
- },
9
- ],
10
- 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
11
- 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
12
- 'max-len': [
13
- 'error',
14
- {
15
- code: 120,
16
- ignoreComments: true,
17
- ignoreTrailingComments: true,
18
- ignoreUrls: true,
19
- ignoreStrings: true,
20
- ignoreTemplateLiterals: true,
21
- ignoreRegExpLiterals: true,
22
- },
23
- ],
24
- 'no-undef': [
25
- 'error',
26
- {
27
- typeof: false,
28
- },
29
- ],
30
- 'array-bracket-spacing': ['error', 'never'],
31
- 'no-empty': [
32
- 'error',
33
- {
34
- allowEmptyCatch: true,
35
- },
36
- ],
37
- 'no-empty-function': [
38
- 'error',
39
- {
40
- allow: [
41
- 'functions',
42
- 'arrowFunctions',
43
- 'generatorFunctions',
44
- 'methods',
45
- 'generatorMethods',
46
- 'getters',
47
- 'setters',
48
- 'constructors',
49
- 'asyncFunctions',
50
- 'asyncMethods',
51
- ],
52
- },
53
- ],
54
- 'no-constant-condition': [
55
- 'error',
56
- {
57
- checkLoops: false,
58
- },
59
- ],
60
- 'one-var-declaration-per-line': [0],
61
- 'space-before-function-paren': [
62
- 'error',
63
- {
64
- anonymous: 'always',
65
- named: 'never',
66
- asyncArrow: 'always',
67
- },
68
- ],
69
- 'generator-star-spacing': [0],
70
- 'newline-per-chained-call': [0],
71
- 'vue/multi-word-component-names': [0],
72
- '@typescript-eslint/no-var-requires': 'off',
73
- '@typescript-eslint/no-unused-vars': [
74
- 'error',
75
- {
76
- argsIgnorePattern: '^_',
77
- },
78
- ],
79
- '@typescript-eslint/no-this-alias': 'off',
80
- '@typescript-eslint/no-unsafe-declaration-merging': 'off',
81
- '@typescript-eslint/ban-ts-comment': [
82
- 'error',
83
- {
84
- 'ts-expect-error': 'allow-with-description',
85
- 'ts-ignore': 'allow-with-description',
86
- },
87
- ],
88
- };
1
+ const rules = require('../common/rules.js');
89
2
 
90
3
  module.exports = {
91
4
  parser: '@typescript-eslint/parser',
package/front/prettier.js CHANGED
@@ -1,8 +1,3 @@
1
- module.exports = {
2
- semi: true,
3
- singleQuote: true,
4
- bracketSpacing: true,
5
- printWidth: 120,
6
- arrowParens: 'avoid',
7
- trailingComma: 'all',
8
- };
1
+ const config = require('../api/prettier.js');
2
+
3
+ module.exports = config;
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@cabloy/lint",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "Node Style Guide for EggBorn/Cabloy.",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "files": [
9
9
  "api",
10
+ "common",
10
11
  "front"
11
12
  ],
12
13
  "dependencies": {