@vinicunca/eslint-config 1.2.7 → 1.4.0

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.js CHANGED
@@ -2,4 +2,4 @@ const { defineConfig } = require('eslint-define-config');
2
2
 
3
3
  module.exports = defineConfig({
4
4
  extends: ['./'],
5
- })
5
+ });
package/base.eslint.js CHANGED
@@ -9,6 +9,8 @@ module.exports = defineConfig({
9
9
  node: true,
10
10
  },
11
11
 
12
+ reportUnusedDisableDirectives: true,
13
+
12
14
  extends: [
13
15
  './standard.eslint',
14
16
  'plugin:import/recommended',
@@ -16,7 +18,6 @@ module.exports = defineConfig({
16
18
  'plugin:sonarjs/recommended',
17
19
  'plugin:jsonc/recommended-with-jsonc',
18
20
  'plugin:yml/standard',
19
- 'plugin:markdown/recommended',
20
21
  ],
21
22
 
22
23
  ignorePatterns: [
@@ -38,16 +39,14 @@ module.exports = defineConfig({
38
39
  ],
39
40
 
40
41
  plugins: [
41
- 'html', 'unicorn', 'sonarjs',
42
+ 'html',
43
+ 'unicorn',
44
+ 'sonarjs',
42
45
  ],
43
46
 
44
47
  settings: {
45
48
  'import/resolver': {
46
- node: {
47
- extensions: [
48
- '.js', '.mjs', '.ts', '.d.ts',
49
- ],
50
- },
49
+ node: { extensions: ['.js', '.mjs'] },
51
50
  },
52
51
  },
53
52
 
@@ -101,6 +100,8 @@ module.exports = defineConfig({
101
100
  },
102
101
  ],
103
102
 
103
+ 'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 1 }],
104
+
104
105
  // es6
105
106
  'no-var': 'error',
106
107
  'prefer-const': [
@@ -125,6 +126,7 @@ module.exports = defineConfig({
125
126
  avoidQuotes: true,
126
127
  },
127
128
  ],
129
+ 'prefer-exponentiation-operator': 'error',
128
130
  'prefer-rest-params': 'error',
129
131
  'prefer-spread': 'error',
130
132
  'prefer-template': 'error',
@@ -219,9 +221,15 @@ module.exports = defineConfig({
219
221
  files: ['*.json', '*.json5'],
220
222
  parser: 'jsonc-eslint-parser',
221
223
  rules: {
222
- 'quotes': ['error', 'double'],
223
- 'quote-props': ['error', 'always'],
224
- 'comma-dangle': ['error', 'never'],
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 }],
225
233
  },
226
234
  },
227
235
  {
@@ -240,33 +248,47 @@ module.exports = defineConfig({
240
248
  {
241
249
  pathPattern: '^$',
242
250
  order: [
251
+ 'publisher',
243
252
  'name',
253
+ 'displayName',
244
254
  'type',
245
255
  'version',
246
256
  'private',
247
257
  'packageManager',
248
258
  'description',
249
- 'keywords',
250
- 'license',
251
259
  'author',
252
- 'repository',
260
+ 'license',
253
261
  'funding',
262
+ 'homepage',
263
+ 'repository',
264
+ 'bugs',
265
+ 'keywords',
266
+ 'categories',
267
+ 'sideEffects',
268
+ 'exports',
254
269
  'main',
255
270
  'module',
256
- 'types',
257
271
  'unpkg',
258
272
  'jsdelivr',
259
- 'exports',
260
- 'files',
273
+ 'types',
274
+ 'typesVersions',
261
275
  'bin',
262
- 'sideEffects',
276
+ 'icon',
277
+ 'files',
278
+ 'engines',
279
+ 'activationEvents',
280
+ 'contributes',
263
281
  'scripts',
264
282
  'peerDependencies',
265
283
  'peerDependenciesMeta',
266
284
  'dependencies',
267
285
  'optionalDependencies',
268
286
  'devDependencies',
287
+ 'pnpm',
288
+ 'overrides',
289
+ 'resolutions',
269
290
  'husky',
291
+ 'simple-git-hooks',
270
292
  'lint-staged',
271
293
  'eslintConfig',
272
294
  ],
@@ -275,6 +297,14 @@ module.exports = defineConfig({
275
297
  pathPattern: '^(?:dev|peer|optional|bundled)?[Dd]ependencies$',
276
298
  order: { type: 'asc' },
277
299
  },
300
+ {
301
+ pathPattern: '^exports.*$',
302
+ order: [
303
+ 'types',
304
+ 'require',
305
+ 'import',
306
+ ],
307
+ },
278
308
  ],
279
309
  },
280
310
  },
@@ -304,23 +334,5 @@ module.exports = defineConfig({
304
334
  'no-unused-expressions': 'off',
305
335
  },
306
336
  },
307
- {
308
- // Code blocks in markdown file
309
- files: ['**/*.md/*.*'],
310
- rules: {
311
- '@typescript-eslint/no-redeclare': 'off',
312
- '@typescript-eslint/no-unused-vars': 'off',
313
- '@typescript-eslint/no-use-before-define': 'off',
314
- '@typescript-eslint/no-var-requires': 'off',
315
- '@typescript-eslint/comma-dangle': 'off',
316
- 'import/no-unresolved': 'off',
317
- 'no-alert': 'off',
318
- 'no-console': 'off',
319
- 'no-restricted-imports': 'off',
320
- 'no-undef': 'off',
321
- 'no-unused-expressions': 'off',
322
- 'no-unused-vars': 'off',
323
- },
324
- },
325
337
  ],
326
338
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vinicunca/eslint-config",
3
- "version": "1.2.7",
3
+ "version": "1.4.0",
4
4
  "description": "Shareable configurations for ESLint & Stylelint",
5
5
  "license": "MIT",
6
6
  "author": "praburangki<https://github.com/praburangki>",
@@ -12,30 +12,29 @@
12
12
  "access": "public"
13
13
  },
14
14
  "dependencies": {
15
- "@typescript-eslint/eslint-plugin": "^5.20.0",
16
- "@typescript-eslint/parser": "^5.20.0",
17
- "eslint-define-config": "^1.3.0",
15
+ "@typescript-eslint/eslint-plugin": "^5.37.0",
16
+ "@typescript-eslint/parser": "^5.37.0",
17
+ "eslint-define-config": "^1.7.0",
18
18
  "eslint-plugin-eslint-comments": "^3.2.0",
19
- "eslint-plugin-html": "^6.2.0",
19
+ "eslint-plugin-html": "^7.1.0",
20
20
  "eslint-plugin-import": "^2.26.0",
21
- "eslint-plugin-jsonc": "^2.2.1",
22
- "eslint-plugin-markdown": "^2.2.1",
23
- "eslint-plugin-n": "^15.1.0",
24
- "eslint-plugin-promise": "^6.0.0",
25
- "eslint-plugin-react": "^7.29.4",
26
- "eslint-plugin-sonarjs": "^0.13.0",
27
- "eslint-plugin-unicorn": "^42.0.0",
28
- "eslint-plugin-vue": "^8.6.0",
29
- "eslint-plugin-yml": "^0.14.0",
21
+ "eslint-plugin-jsonc": "^2.4.0",
22
+ "eslint-plugin-n": "^15.2.5",
23
+ "eslint-plugin-promise": "^6.0.1",
24
+ "eslint-plugin-react": "^7.31.8",
25
+ "eslint-plugin-sonarjs": "^0.15.0",
26
+ "eslint-plugin-unicorn": "^43.0.2",
27
+ "eslint-plugin-vue": "^9.4.0",
28
+ "eslint-plugin-yml": "^1.2.0",
30
29
  "jsonc-eslint-parser": "^2.1.0",
31
- "stylelint": "^14.7.1",
32
- "stylelint-config-standard": "^25.0.0",
33
- "typescript": "^4.6.3",
34
- "yaml-eslint-parser": "^0.5.0"
30
+ "stylelint": "^14.11.0",
31
+ "stylelint-config-standard": "^28.0.0",
32
+ "typescript": "^4.8.3",
33
+ "yaml-eslint-parser": "^1.1.0"
35
34
  },
36
35
  "devDependencies": {
37
- "bumpp": "^7.1.1",
38
- "eslint": "^8.13.0"
36
+ "bumpp": "^8.2.1",
37
+ "eslint": "^8.23.1"
39
38
  },
40
39
  "scripts": {
41
40
  "release": "bumpp package.json --commit --push --tag --commit 'chore: release v'"
@@ -9,6 +9,12 @@ module.exports = defineConfig({
9
9
  'plugin:@typescript-eslint/recommended',
10
10
  ],
11
11
 
12
+ settings: {
13
+ 'import/resolver': {
14
+ node: { extensions: ['.js', '.jsx', '.mjs', '.ts', '.tsx', '.d.ts'] },
15
+ },
16
+ },
17
+
12
18
  overrides: base.overrides,
13
19
 
14
20
  rules: {
package/vue.eslint.js CHANGED
@@ -25,13 +25,25 @@ module.exports = defineConfig({
25
25
  'vue/require-prop-types': 'off',
26
26
  'vue/require-default-prop': 'off',
27
27
  'vue/multi-word-component-names': 'off',
28
-
29
- 'vue/component-tags-order': [
30
- 'error', {
31
- order: [
32
- 'script', 'template', 'style',
33
- ],
34
- },
35
- ],
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',
36
48
  },
37
49
  });