@vinicunca/eslint-config 1.5.0 → 1.6.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/index.js CHANGED
@@ -1,8 +1,5 @@
1
- const { defineConfig } = require('eslint-define-config');
2
-
3
- module.exports = defineConfig({
1
+ module.exports = {
4
2
  extends: [
5
- './react.eslint.js',
6
- './vue.eslint.js',
3
+ '@vinicunca/eslint-config-vue',
7
4
  ],
8
- });
5
+ };
package/package.json CHANGED
@@ -1,42 +1,38 @@
1
1
  {
2
2
  "name": "@vinicunca/eslint-config",
3
- "version": "1.5.0",
3
+ "version": "1.6.2",
4
4
  "description": "Shareable configurations for ESLint & Stylelint",
5
- "license": "MIT",
6
5
  "author": "praburangki<https://github.com/praburangki>",
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/vinicunca/eslint-config.git"
10
- },
11
- "publishConfig": {
12
- "access": "public"
6
+ "license": "MIT",
7
+ "homepage": "https://github.com/vinicunca/eslint-config",
8
+ "keywords": [
9
+ "eslint-config"
10
+ ],
11
+ "main": "index.js",
12
+ "files": [
13
+ "index.js"
14
+ ],
15
+ "peerDependencies": {
16
+ "eslint": ">=7.4.0"
13
17
  },
14
18
  "dependencies": {
15
- "@typescript-eslint/eslint-plugin": "^5.42.1",
16
- "@typescript-eslint/parser": "^5.42.1",
17
- "eslint-define-config": "^1.12.0",
19
+ "@typescript-eslint/eslint-plugin": "^5.48.1",
20
+ "@typescript-eslint/parser": "^5.48.1",
18
21
  "eslint-plugin-eslint-comments": "^3.2.0",
19
22
  "eslint-plugin-html": "^7.1.0",
20
23
  "eslint-plugin-import": "^2.26.0",
21
- "eslint-plugin-jsonc": "^2.5.0",
22
- "eslint-plugin-n": "^15.5.1",
24
+ "eslint-plugin-jsonc": "^2.6.0",
25
+ "eslint-plugin-n": "^15.6.0",
23
26
  "eslint-plugin-promise": "^6.1.1",
24
- "eslint-plugin-react": "^7.31.10",
25
- "eslint-plugin-sonarjs": "^0.16.0",
26
- "eslint-plugin-unicorn": "^44.0.2",
27
- "eslint-plugin-vue": "^9.7.0",
28
- "eslint-plugin-yml": "^1.2.0",
27
+ "eslint-plugin-sonarjs": "^0.17.0",
28
+ "eslint-plugin-unicorn": "^45.0.2",
29
+ "eslint-plugin-vue": "^9.8.0",
30
+ "eslint-plugin-yml": "^1.4.0",
29
31
  "jsonc-eslint-parser": "^2.1.0",
30
- "stylelint": "^14.15.0",
31
- "stylelint-config-standard": "^29.0.0",
32
- "typescript": "^4.8.3",
33
- "yaml-eslint-parser": "^1.1.0"
32
+ "yaml-eslint-parser": "^1.1.0",
33
+ "@vinicunca/eslint-config-vue": "1.6.2"
34
34
  },
35
35
  "devDependencies": {
36
- "bumpp": "^8.2.1",
37
- "eslint": "^8.27.0"
38
- },
39
- "scripts": {
40
- "release": "bumpp package.json --commit --push --tag --commit 'chore: release v'"
36
+ "eslint": "^8.31.0"
41
37
  }
42
38
  }
package/.eslintrc.js DELETED
@@ -1,5 +0,0 @@
1
- const { defineConfig } = require('eslint-define-config');
2
-
3
- module.exports = defineConfig({
4
- extends: ['./'],
5
- });
@@ -1,34 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'v*'
7
-
8
- jobs:
9
- release:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - uses: actions/checkout@v3
13
- with:
14
- fetch-depth: 0
15
- - name: Set node
16
- uses: actions/setup-node@v3
17
- with:
18
- node-version: 16.x
19
- registry-url: 'https://registry.npmjs.org'
20
-
21
- - name: Setup
22
- run: npm i -g pnpm
23
-
24
- - run: pnpm dlx conventional-github-releaser -p angular
25
- env:
26
- CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27
-
28
- - name: Install Dependencies
29
- run: pnpm install
30
-
31
- - name: Publish to NPM
32
- run: pnpm publish --access public --no-git-checks
33
- env:
34
- NODE_AUTH_TOKEN: ${{ secrets.VINICUNCA_NPM_TOKEN }}
package/.node-version DELETED
@@ -1 +0,0 @@
1
- 16.14.0
package/base.eslint.js DELETED
@@ -1,338 +0,0 @@
1
- const { defineConfig } = require('eslint-define-config');
2
-
3
- module.exports = defineConfig({
4
- root: true,
5
-
6
- env: {
7
- es6: true,
8
- browser: true,
9
- node: true,
10
- },
11
-
12
- reportUnusedDisableDirectives: true,
13
-
14
- extends: [
15
- './standard.eslint',
16
- 'plugin:import/recommended',
17
- 'plugin:eslint-comments/recommended',
18
- 'plugin:sonarjs/recommended',
19
- 'plugin:jsonc/recommended-with-jsonc',
20
- 'plugin:yml/standard',
21
- ],
22
-
23
- ignorePatterns: [
24
- '*.min.*',
25
- 'CHANGELOG.md',
26
- 'dist',
27
- 'LICENSE*',
28
- 'output',
29
- 'coverage',
30
- 'public',
31
- 'temp',
32
- 'packages-lock.json',
33
- 'pnpm-lock.yaml',
34
- 'yarn.lock',
35
- '__snapshots__',
36
- '!.github',
37
- '!.vitepress',
38
- '!.vscode',
39
- ],
40
-
41
- plugins: [
42
- 'html',
43
- 'unicorn',
44
- 'sonarjs',
45
- ],
46
-
47
- settings: {
48
- 'import/resolver': {
49
- node: { extensions: ['.js', '.mjs'] },
50
- },
51
- },
52
-
53
- rules: {
54
- 'import/order': ['error'],
55
- 'import/first': 'error',
56
- 'import/no-mutable-exports': 'error',
57
- 'import/no-unresolved': 'off',
58
- 'import/no-absolute-path': 'off',
59
-
60
- // Common
61
- 'semi': ['error', 'always'],
62
- 'curly': ['error', 'all'],
63
- 'quotes': ['error', 'single'],
64
- 'quote-props': ['error', 'consistent-as-needed'],
65
- 'no-unused-vars': 'off',
66
- 'no-param-reassign': 'off',
67
- 'array-bracket-newline': ['error', 'consistent'],
68
- 'array-element-newline': ['error', 'consistent'],
69
- 'array-bracket-spacing': ['error', 'never'],
70
- 'brace-style': ['error'],
71
- 'block-spacing': ['error', 'always'],
72
- 'camelcase': 'off',
73
- 'comma-spacing': ['error', { before: false, after: true }],
74
- 'comma-style': ['error', 'last'],
75
- 'comma-dangle': ['error', 'always-multiline'],
76
- 'no-constant-condition': 'warn',
77
- 'no-debugger': 'error',
78
- 'no-console': ['error', { allow: ['warn', 'error'] }],
79
- 'no-cond-assign': ['error', 'always'],
80
- 'no-tabs': 'error',
81
- 'func-call-spacing': ['off', 'never'],
82
- 'key-spacing': ['error', { beforeColon: false, afterColon: true }],
83
- 'indent': [
84
- 'error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 },
85
- ],
86
- 'no-restricted-syntax': [
87
- 'error',
88
- 'DebuggerStatement',
89
- 'ForInStatement',
90
- 'LabeledStatement',
91
- 'WithStatement',
92
- ],
93
- 'object-curly-spacing': ['error', 'always'],
94
- 'no-return-await': 'off',
95
- 'space-before-function-paren': [
96
- 'error', {
97
- anonymous: 'never',
98
- named: 'never',
99
- asyncArrow: 'always',
100
- },
101
- ],
102
-
103
- 'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 1 }],
104
-
105
- // es6
106
- 'no-var': 'error',
107
- 'prefer-const': [
108
- 'error',
109
- {
110
- destructuring: 'any',
111
- ignoreReadBeforeAssign: true,
112
- },
113
- ],
114
- 'prefer-arrow-callback': [
115
- 'error',
116
- {
117
- allowNamedFunctions: false,
118
- allowUnboundThis: true,
119
- },
120
- ],
121
- 'object-shorthand': [
122
- 'error',
123
- 'always',
124
- {
125
- ignoreConstructors: false,
126
- avoidQuotes: true,
127
- },
128
- ],
129
- 'prefer-exponentiation-operator': 'error',
130
- 'prefer-rest-params': 'error',
131
- 'prefer-spread': 'error',
132
- 'prefer-template': 'error',
133
- 'template-curly-spacing': 'error',
134
- 'arrow-parens': ['error', 'always'],
135
- 'generator-star-spacing': 'off',
136
- 'spaced-comment': [
137
- 'error',
138
- 'always',
139
- {
140
- line: {
141
- markers: ['/'],
142
- exceptions: ['/', '#'],
143
- },
144
- block: {
145
- markers: ['!'],
146
- exceptions: ['*'],
147
- balanced: true,
148
- },
149
- },
150
- ],
151
-
152
- // best-practice
153
- 'array-callback-return': 'error',
154
- 'block-scoped-var': 'error',
155
- 'consistent-return': 'off',
156
- 'complexity': ['off', 11],
157
- 'eqeqeq': ['error', 'smart'],
158
- 'no-alert': 'warn',
159
- 'no-case-declarations': 'error',
160
- 'no-multi-spaces': 'error',
161
- 'no-multi-str': 'error',
162
- 'no-with': 'error',
163
- 'no-void': 'error',
164
- 'no-useless-escape': 'off',
165
- 'vars-on-top': 'error',
166
- 'require-await': 'off',
167
- 'no-return-assign': 'off',
168
- 'operator-linebreak': ['error', 'before'],
169
-
170
- // unicorns
171
- // Pass error message when throwing errors
172
- 'unicorn/error-message': 'error',
173
- // Uppercase regex escapes
174
- 'unicorn/escape-case': 'error',
175
- // Array.isArray instead of instanceof
176
- 'unicorn/no-array-instanceof': 'error',
177
- // Prevent deprecated `new Buffer()`
178
- 'unicorn/no-new-buffer': 'error',
179
- // Keep regex literals safe!
180
- 'unicorn/no-unsafe-regex': 'off',
181
- // Lowercase number formatting for octal, hex, binary (0x1'error' instead of 0X1'error')
182
- 'unicorn/number-literal-case': 'error',
183
- // ** instead of Math.pow()
184
- 'unicorn/prefer-exponentiation-operator': 'error',
185
- // includes over indexOf when checking for existence
186
- 'unicorn/prefer-includes': 'error',
187
- // String methods startsWith/endsWith instead of more complicated stuff
188
- 'unicorn/prefer-starts-ends-with': 'error',
189
- // textContent instead of innerText
190
- 'unicorn/prefer-text-content': 'error',
191
- // Enforce throwing type error when throwing error while checking typeof
192
- 'unicorn/prefer-type-error': 'error',
193
- // Use new when throwing error
194
- 'unicorn/throw-new-error': 'error',
195
-
196
- 'no-use-before-define': ['error', { functions: false, classes: false, variables: true }],
197
- 'eslint-comments/disable-enable-pair': 'off',
198
- 'import/no-named-as-default-member': 'off',
199
- 'n/no-callback-literal': 'off',
200
-
201
- 'sort-imports': [
202
- 'error',
203
- {
204
- ignoreCase: false,
205
- ignoreDeclarationSort: true,
206
- ignoreMemberSort: false,
207
- memberSyntaxSortOrder: [
208
- 'none', 'all', 'multiple', 'single',
209
- ],
210
- allowSeparatedGroups: false,
211
- },
212
- ],
213
-
214
- // yml
215
- 'yml/quotes': ['error', { prefer: 'single', avoidEscape: false }],
216
- 'yml/no-empty-document': 'off',
217
- },
218
-
219
- overrides: [
220
- {
221
- files: ['*.json', '*.json5'],
222
- parser: 'jsonc-eslint-parser',
223
- rules: {
224
- 'jsonc/array-bracket-spacing': ['error', 'never'],
225
- 'jsonc/comma-dangle': ['error', 'never'],
226
- 'jsonc/comma-style': ['error', 'last'],
227
- 'jsonc/indent': ['error', 2],
228
- 'jsonc/key-spacing': ['error', { beforeColon: false, afterColon: true }],
229
- 'jsonc/no-octal-escape': 'error',
230
- 'jsonc/object-curly-newline': ['error', { multiline: true, consistent: true }],
231
- 'jsonc/object-curly-spacing': ['error', 'always'],
232
- 'jsonc/object-property-newline': ['error', { allowMultiplePropertiesPerLine: true }],
233
- },
234
- },
235
- {
236
- files: ['*.yaml', '*.yml'],
237
- parser: 'yaml-eslint-parser',
238
- rules: {
239
- 'spaced-comment': 'off',
240
- },
241
- },
242
- {
243
- files: ['package.json'],
244
- parser: 'jsonc-eslint-parser',
245
- rules: {
246
- 'jsonc/sort-keys': [
247
- 'error',
248
- {
249
- pathPattern: '^$',
250
- order: [
251
- 'publisher',
252
- 'name',
253
- 'displayName',
254
- 'type',
255
- 'version',
256
- 'private',
257
- 'packageManager',
258
- 'description',
259
- 'author',
260
- 'license',
261
- 'funding',
262
- 'homepage',
263
- 'repository',
264
- 'bugs',
265
- 'keywords',
266
- 'categories',
267
- 'sideEffects',
268
- 'exports',
269
- 'main',
270
- 'module',
271
- 'unpkg',
272
- 'jsdelivr',
273
- 'types',
274
- 'typesVersions',
275
- 'bin',
276
- 'icon',
277
- 'files',
278
- 'engines',
279
- 'activationEvents',
280
- 'contributes',
281
- 'scripts',
282
- 'peerDependencies',
283
- 'peerDependenciesMeta',
284
- 'dependencies',
285
- 'optionalDependencies',
286
- 'devDependencies',
287
- 'pnpm',
288
- 'overrides',
289
- 'resolutions',
290
- 'husky',
291
- 'simple-git-hooks',
292
- 'lint-staged',
293
- 'eslintConfig',
294
- ],
295
- },
296
- {
297
- pathPattern: '^(?:dev|peer|optional|bundled)?[Dd]ependencies$',
298
- order: { type: 'asc' },
299
- },
300
- {
301
- pathPattern: '^exports.*$',
302
- order: [
303
- 'types',
304
- 'require',
305
- 'import',
306
- ],
307
- },
308
- ],
309
- },
310
- },
311
- {
312
- files: ['*.d.ts'],
313
- rules: {
314
- 'import/no-duplicates': 'off',
315
- },
316
- },
317
- {
318
- files: ['*.js'],
319
- rules: {
320
- '@typescript-eslint/no-var-requires': 'off',
321
- },
322
- },
323
- {
324
- files: ['scripts/**/*.*', 'cli.*'],
325
- rules: {
326
- 'no-console': 'off',
327
- },
328
- },
329
- {
330
- files: [
331
- '*.test.ts', '*.test.js', '*.spec.ts', '*.spec.js',
332
- ],
333
- rules: {
334
- 'no-unused-expressions': 'off',
335
- },
336
- },
337
- ],
338
- });
package/react.eslint.js DELETED
@@ -1,19 +0,0 @@
1
- const { defineConfig } = require('eslint-define-config');
2
-
3
- module.exports = defineConfig({
4
- extends: ['plugin:react/recommended', './typescript.eslint.js'],
5
-
6
- settings: {
7
- react: {
8
- version: '17.0',
9
- },
10
- },
11
-
12
- rules: {
13
- 'jsx-quotes': ['error', 'prefer-double'],
14
- 'react/react-in-jsx-scope': 'off',
15
- 'react/display-name': 'off',
16
- 'react/no-unknown-property': ['error', { ignore: ['class'] }],
17
- 'react/jsx-curly-spacing': ['error', { when: 'always', children: true }],
18
- },
19
- });
@@ -1,317 +0,0 @@
1
- // Inline from https://github.com/standard/eslint-config-standard/blob/master/.eslintrc.json
2
- // Until it upgrades
3
-
4
- module.exports = {
5
- parserOptions: {
6
- ecmaVersion: 2022,
7
- ecmaFeatures: {
8
- jsx: true,
9
- },
10
- sourceType: 'module',
11
- },
12
- env: {
13
- es2021: true,
14
- node: true,
15
- },
16
- plugins: [
17
- 'import', 'n', 'promise',
18
- ],
19
- globals: {
20
- document: 'readonly',
21
- navigator: 'readonly',
22
- window: 'readonly',
23
- },
24
- rules: {
25
- 'no-var': 'warn',
26
- 'object-shorthand': ['warn', 'properties'],
27
-
28
- 'accessor-pairs': ['error', { setWithoutGet: true, enforceForClassMembers: true }],
29
- 'array-bracket-spacing': ['error', 'never'],
30
- 'array-bracket-newline': ['error', { multiline: true, minItems: 3 }],
31
- 'array-callback-return': [
32
- 'error',
33
- {
34
- allowImplicit: false,
35
- checkForEach: false,
36
- },
37
- ],
38
- 'arrow-spacing': ['error', { before: true, after: true }],
39
- 'block-spacing': ['error', 'always'],
40
- 'brace-style': [
41
- 'error', '1tbs', { allowSingleLine: true },
42
- ],
43
- 'camelcase': [
44
- 'error',
45
- {
46
- allow: ['^UNSAFE_'],
47
- properties: 'never',
48
- ignoreGlobals: true,
49
- },
50
- ],
51
- 'comma-dangle': [
52
- 'error',
53
- {
54
- arrays: 'never',
55
- objects: 'never',
56
- imports: 'never',
57
- exports: 'never',
58
- functions: 'never',
59
- },
60
- ],
61
- 'comma-spacing': ['error', { before: false, after: true }],
62
- 'comma-style': ['error', 'last'],
63
- 'computed-property-spacing': [
64
- 'error', 'never', { enforceForClassMembers: true },
65
- ],
66
- 'constructor-super': 'error',
67
- 'curly': ['error', 'multi-line'],
68
- 'default-case-last': 'error',
69
- 'dot-location': ['error', 'property'],
70
- 'dot-notation': ['error', { allowKeywords: true }],
71
- 'eol-last': 'error',
72
- 'eqeqeq': [
73
- 'error', 'always', { null: 'ignore' },
74
- ],
75
- 'func-call-spacing': ['error', 'never'],
76
- 'generator-star-spacing': ['error', { before: true, after: true }],
77
- 'indent': [
78
- 'error',
79
- 2,
80
- {
81
- SwitchCase: 1,
82
- VariableDeclarator: 1,
83
- outerIIFEBody: 1,
84
- MemberExpression: 1,
85
- FunctionDeclaration: { parameters: 1, body: 1 },
86
- FunctionExpression: { parameters: 1, body: 1 },
87
- CallExpression: { arguments: 1 },
88
- ArrayExpression: 1,
89
- ObjectExpression: 1,
90
- ImportDeclaration: 1,
91
- flatTernaryExpressions: false,
92
- ignoreComments: false,
93
- ignoredNodes: [
94
- 'TemplateLiteral *',
95
- 'JSXElement',
96
- 'JSXElement > *',
97
- 'JSXAttribute',
98
- 'JSXIdentifier',
99
- 'JSXNamespacedName',
100
- 'JSXMemberExpression',
101
- 'JSXSpreadAttribute',
102
- 'JSXExpressionContainer',
103
- 'JSXOpeningElement',
104
- 'JSXClosingElement',
105
- 'JSXFragment',
106
- 'JSXOpeningFragment',
107
- 'JSXClosingFragment',
108
- 'JSXText',
109
- 'JSXEmptyExpression',
110
- 'JSXSpreadChild',
111
- ],
112
- offsetTernaryExpressions: true,
113
- },
114
- ],
115
- 'key-spacing': ['error', { beforeColon: false, afterColon: true }],
116
- 'keyword-spacing': ['error', { before: true, after: true }],
117
- 'lines-between-class-members': [
118
- 'error', 'always', { exceptAfterSingleLine: true },
119
- ],
120
- 'multiline-ternary': ['error', 'always-multiline'],
121
- 'new-cap': ['error', { newIsCap: true, capIsNew: false, properties: true }],
122
- 'new-parens': 'error',
123
- 'no-array-constructor': 'error',
124
- 'no-async-promise-executor': 'error',
125
- 'no-caller': 'error',
126
- 'no-case-declarations': 'error',
127
- 'no-class-assign': 'error',
128
- 'no-compare-neg-zero': 'error',
129
- 'no-cond-assign': 'error',
130
- 'no-const-assign': 'error',
131
- 'no-constant-condition': ['error', { checkLoops: false }],
132
- 'no-control-regex': 'error',
133
- 'no-debugger': 'error',
134
- 'no-delete-var': 'error',
135
- 'no-dupe-args': 'error',
136
- 'no-dupe-class-members': 'error',
137
- 'no-dupe-keys': 'error',
138
- 'no-duplicate-case': 'error',
139
- 'no-useless-backreference': 'error',
140
- 'no-empty': ['error', { allowEmptyCatch: true }],
141
- 'no-empty-character-class': 'error',
142
- 'no-empty-pattern': 'error',
143
- 'no-eval': 'error',
144
- 'no-ex-assign': 'error',
145
- 'no-extend-native': 'error',
146
- 'no-extra-bind': 'error',
147
- 'no-extra-boolean-cast': 'error',
148
- 'no-extra-parens': ['error', 'functions'],
149
- 'no-fallthrough': 'error',
150
- 'no-floating-decimal': 'error',
151
- 'no-func-assign': 'error',
152
- 'no-global-assign': 'error',
153
- 'no-implied-eval': 'error',
154
- 'no-import-assign': 'error',
155
- 'no-invalid-regexp': 'error',
156
- 'no-irregular-whitespace': 'error',
157
- 'no-iterator': 'error',
158
- 'no-labels': ['error', { allowLoop: false, allowSwitch: false }],
159
- 'no-lone-blocks': 'error',
160
- 'no-loss-of-precision': 'error',
161
- 'no-misleading-character-class': 'error',
162
- 'no-prototype-builtins': 'error',
163
- 'no-useless-catch': 'error',
164
- 'no-mixed-operators': [
165
- 'error',
166
- {
167
- groups: [
168
- [
169
- '==', '!=', '===', '!==', '>', '>=', '<', '<=',
170
- ],
171
- ['&&', '||'],
172
- ['in', 'instanceof'],
173
- ],
174
- allowSamePrecedence: true,
175
- },
176
- ],
177
- 'no-mixed-spaces-and-tabs': 'error',
178
- 'no-multi-spaces': 'error',
179
- 'no-multi-str': 'error',
180
- 'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 0 }],
181
- 'no-new': 'error',
182
- 'no-new-func': 'error',
183
- 'no-new-object': 'error',
184
- 'no-new-symbol': 'error',
185
- 'no-new-wrappers': 'error',
186
- 'no-obj-calls': 'error',
187
- 'no-octal': 'error',
188
- 'no-octal-escape': 'error',
189
- 'no-proto': 'error',
190
- 'no-redeclare': ['error', { builtinGlobals: false }],
191
- 'no-regex-spaces': 'error',
192
- 'no-return-assign': ['error', 'except-parens'],
193
- 'no-self-assign': ['error', { props: true }],
194
- 'no-self-compare': 'error',
195
- 'no-sequences': 'error',
196
- 'no-shadow-restricted-names': 'error',
197
- 'no-sparse-arrays': 'error',
198
- 'no-tabs': 'error',
199
- 'no-template-curly-in-string': 'error',
200
- 'no-this-before-super': 'error',
201
- 'no-throw-literal': 'error',
202
- 'no-trailing-spaces': 'error',
203
- 'no-undef': 'error',
204
- 'no-undef-init': 'error',
205
- 'no-unexpected-multiline': 'error',
206
- 'no-unmodified-loop-condition': 'error',
207
- 'no-unneeded-ternary': ['error', { defaultAssignment: false }],
208
- 'no-unreachable': 'error',
209
- 'no-unreachable-loop': 'error',
210
- 'no-unsafe-finally': 'error',
211
- 'no-unsafe-negation': 'error',
212
- 'no-unused-expressions': [
213
- 'error',
214
- {
215
- allowShortCircuit: true,
216
- allowTernary: true,
217
- allowTaggedTemplates: true,
218
- },
219
- ],
220
- 'no-unused-vars': [
221
- 'error',
222
- {
223
- args: 'none',
224
- caughtErrors: 'none',
225
- ignoreRestSiblings: true,
226
- vars: 'all',
227
- },
228
- ],
229
- 'no-use-before-define': ['error', { functions: false, classes: false, variables: false }],
230
- 'no-useless-call': 'error',
231
- 'no-useless-computed-key': 'error',
232
- 'no-useless-constructor': 'error',
233
- 'no-useless-escape': 'error',
234
- 'no-useless-rename': 'error',
235
- 'no-useless-return': 'error',
236
- 'no-void': 'error',
237
- 'no-whitespace-before-property': 'error',
238
- 'no-with': 'error',
239
- 'object-curly-newline': ['error', { multiline: true, consistent: true }],
240
- 'object-curly-spacing': ['error', 'always'],
241
- 'object-property-newline': ['error', { allowMultiplePropertiesPerLine: true }],
242
- 'one-var': ['error', { initialized: 'never' }],
243
- 'operator-linebreak': [
244
- 'error',
245
- 'after',
246
- { overrides: { '?': 'before', ':': 'before', '|>': 'before' } },
247
- ],
248
- 'padded-blocks': ['error', { blocks: 'never', switches: 'never', classes: 'never' }],
249
- 'prefer-const': ['error', { destructuring: 'all' }],
250
- 'prefer-promise-reject-errors': 'error',
251
- 'prefer-regex-literals': ['error', { disallowRedundantWrapping: true }],
252
- 'quote-props': ['error', 'as-needed'],
253
- 'quotes': [
254
- 'error', 'single', { avoidEscape: true, allowTemplateLiterals: false },
255
- ],
256
- 'rest-spread-spacing': ['error', 'never'],
257
- 'semi': ['error', 'never'],
258
- 'semi-spacing': ['error', { before: false, after: true }],
259
- 'space-before-blocks': ['error', 'always'],
260
- 'space-before-function-paren': ['error', 'always'],
261
- 'space-in-parens': ['error', 'never'],
262
- 'space-infix-ops': 'error',
263
- 'space-unary-ops': ['error', { words: true, nonwords: false }],
264
- 'spaced-comment': [
265
- 'error',
266
- 'always',
267
- {
268
- line: {
269
- markers: [
270
- '*package', '!', '/', ',', '=',
271
- ],
272
- },
273
- block: {
274
- balanced: true,
275
- markers: [
276
- '*package', '!', ',', ':', '::', 'flow-include',
277
- ],
278
- exceptions: ['*'],
279
- },
280
- },
281
- ],
282
- 'symbol-description': 'error',
283
- 'template-curly-spacing': ['error', 'never'],
284
- 'template-tag-spacing': ['error', 'never'],
285
- 'unicode-bom': ['error', 'never'],
286
- 'use-isnan': [
287
- 'error',
288
- {
289
- enforceForSwitchCase: true,
290
- enforceForIndexOf: true,
291
- },
292
- ],
293
- 'valid-typeof': ['error', { requireStringLiterals: true }],
294
- 'wrap-iife': [
295
- 'error', 'any', { functionPrototypeMethods: true },
296
- ],
297
- 'yield-star-spacing': ['error', 'both'],
298
- 'yoda': ['error', 'never'],
299
-
300
- 'import/export': 'error',
301
- 'import/first': 'error',
302
- 'import/no-absolute-path': ['error', { esmodule: true, commonjs: true, amd: false }],
303
- 'import/no-duplicates': 'error',
304
- 'import/no-named-default': 'error',
305
- 'import/no-webpack-loader-syntax': 'error',
306
-
307
- 'n/handle-callback-err': ['error', '^(err|error)$'],
308
- 'n/no-callback-literal': 'error',
309
- 'n/no-deprecated-api': 'error',
310
- 'n/no-exports-assign': 'error',
311
- 'n/no-new-require': 'error',
312
- 'n/no-path-concat': 'error',
313
- 'n/process-exit-as-throw': 'error',
314
-
315
- 'promise/param-names': 'error',
316
- },
317
- };
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- extends: ['stylelint-config-standard'],
3
-
4
- // add your custom config here
5
- // https://stylelint.io/user-guide/configuration
6
- rules: {},
7
- };
@@ -1,119 +0,0 @@
1
- const { defineConfig } = require('eslint-define-config');
2
-
3
- const base = require('./base.eslint');
4
-
5
- module.exports = defineConfig({
6
- extends: [
7
- './base.eslint.js',
8
- 'plugin:import/typescript',
9
- 'plugin:@typescript-eslint/recommended',
10
- ],
11
-
12
- settings: {
13
- 'import/resolver': {
14
- node: { extensions: ['.js', '.jsx', '.mjs', '.ts', '.tsx', '.d.ts'] },
15
- },
16
- },
17
-
18
- overrides: base.overrides,
19
-
20
- rules: {
21
- 'import/named': 'off',
22
- 'import/order': [
23
- 'error', {
24
- 'groups': [
25
- 'type', 'builtin', 'external', 'internal', ['parent', 'sibling'], 'object', 'index',
26
- ],
27
- 'newlines-between': 'always',
28
- },
29
- ],
30
-
31
- // TS
32
- '@typescript-eslint/semi': ['error', 'always'],
33
- '@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],
34
- '@typescript-eslint/member-delimiter-style': ['error'],
35
- '@typescript-eslint/type-annotation-spacing': ['error', {}],
36
- '@typescript-eslint/consistent-type-imports': [
37
- 'error',
38
- { prefer: 'type-imports', disallowTypeAnnotations: false },
39
- ],
40
- '@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
41
- '@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],
42
- '@typescript-eslint/prefer-ts-expect-error': 'error',
43
-
44
- // Override JS
45
- 'no-useless-constructor': 'off',
46
- 'indent': 'off',
47
- '@typescript-eslint/indent': [
48
- 'error', 2, {
49
- SwitchCase: 1,
50
- VariableDeclarator: 1,
51
- outerIIFEBody: 1,
52
- MemberExpression: 1,
53
- FunctionDeclaration: { parameters: 1, body: 1 },
54
- FunctionExpression: { parameters: 1, body: 1 },
55
- CallExpression: { arguments: 1 },
56
- ArrayExpression: 1,
57
- ObjectExpression: 1,
58
- ImportDeclaration: 1,
59
- flatTernaryExpressions: false,
60
- ignoreComments: false,
61
- ignoredNodes: [
62
- 'TemplateLiteral *',
63
- 'JSXElement',
64
- 'JSXElement > *',
65
- 'JSXAttribute',
66
- 'JSXIdentifier',
67
- 'JSXNamespacedName',
68
- 'JSXMemberExpression',
69
- 'JSXSpreadAttribute',
70
- 'JSXExpressionContainer',
71
- 'JSXOpeningElement',
72
- 'JSXClosingElement',
73
- 'JSXFragment',
74
- 'JSXOpeningFragment',
75
- 'JSXClosingFragment',
76
- 'JSXText',
77
- 'JSXEmptyExpression',
78
- 'JSXSpreadChild',
79
- 'TSTypeParameterInstantiation',
80
- ],
81
- offsetTernaryExpressions: true,
82
- },
83
- ],
84
-
85
- 'no-unused-vars': 'off',
86
- '@typescript-eslint/no-unused-vars': ['error', {
87
- argsIgnorePattern: '^_',
88
- destructuredArrayIgnorePattern: '^_',
89
- ignoreRestSiblings: true,
90
- }],
91
- 'no-redeclare': 'off',
92
- '@typescript-eslint/no-redeclare': 'error',
93
- 'no-use-before-define': 'off',
94
- '@typescript-eslint/no-use-before-define': [
95
- 'error',
96
- { functions: false, classes: false, variables: true },
97
- ],
98
- 'brace-style': 'off',
99
- '@typescript-eslint/brace-style': ['error', '1tbs'],
100
- 'comma-dangle': 'off',
101
- '@typescript-eslint/comma-dangle': ['error', 'always-multiline'],
102
- 'object-curly-spacing': 'off',
103
- '@typescript-eslint/object-curly-spacing': ['error', 'always'],
104
-
105
- // off
106
- '@typescript-eslint/camelcase': 'off',
107
- '@typescript-eslint/explicit-function-return-type': 'off',
108
- '@typescript-eslint/explicit-member-accessibility': 'off',
109
- '@typescript-eslint/no-explicit-any': 'off',
110
- '@typescript-eslint/no-parameter-properties': 'off',
111
- '@typescript-eslint/no-empty-interface': 'off',
112
- '@typescript-eslint/ban-ts-ignore': 'off',
113
- '@typescript-eslint/no-empty-function': 'off',
114
- '@typescript-eslint/no-non-null-assertion': 'off',
115
- '@typescript-eslint/explicit-module-boundary-types': 'off',
116
- '@typescript-eslint/ban-types': 'off',
117
- '@typescript-eslint/no-namespace': 'off',
118
- },
119
- });
package/vue.eslint.js DELETED
@@ -1,49 +0,0 @@
1
- const { defineConfig } = require('eslint-define-config');
2
-
3
- module.exports = defineConfig({
4
- extends: ['plugin:vue/vue3-recommended', './typescript.eslint.js'],
5
-
6
- overrides: [
7
- {
8
- files: ['*.vue'],
9
- parser: 'vue-eslint-parser',
10
- parserOptions: {
11
- parser: '@typescript-eslint/parser',
12
- },
13
- rules: {
14
- 'no-unused-vars': 'off',
15
- 'no-undef': 'off',
16
- '@typescript-eslint/no-unused-vars': 'off',
17
- },
18
- },
19
- ],
20
-
21
- rules: {
22
- 'vue/max-attributes-per-line': ['warn', { singleline: 5 }],
23
- 'vue/html-self-closing': 'off',
24
- 'vue/no-v-html': 'off',
25
- 'vue/require-prop-types': 'off',
26
- 'vue/require-default-prop': 'off',
27
- 'vue/multi-word-component-names': 'off',
28
- 'vue/component-tags-order': ['error', {
29
- order: ['script', 'template', 'style'],
30
- }],
31
- 'vue/block-tag-newline': ['error', {
32
- singleline: 'always',
33
- multiline: 'always',
34
- }],
35
- 'vue/component-name-in-template-casing': ['error', 'PascalCase'],
36
- 'vue/component-options-name-casing': ['error', 'PascalCase'],
37
- 'vue/custom-event-name-casing': ['error', 'camelCase'],
38
- 'vue/define-macros-order': ['error', {
39
- order: ['defineProps', 'defineEmits'],
40
- }],
41
- 'vue/html-comment-content-spacing': ['error', 'always', {
42
- exceptions: ['-'],
43
- }],
44
- 'vue/no-restricted-v-bind': ['error', '/^v-/'],
45
- 'vue/no-useless-v-bind': 'error',
46
- 'vue/padding-line-between-blocks': ['error', 'always'],
47
- 'vue/prefer-separate-static-class': 'error',
48
- },
49
- });