@useinsider/eslint-config 1.1.5 → 1.2.0-beta.1

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/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@useinsider/eslint-config",
3
- "version": "1.1.5",
3
+ "type": "module",
4
+ "version": "1.2.0-beta.1",
4
5
  "description": "A collection of ESLint configurations provided by @useinsider, offering support for various environments including Vanilla JS, TypeScript, and framework-specific setups such as Vue 3.",
5
6
  "keywords": [
6
7
  "useinsider",
@@ -21,6 +22,8 @@
21
22
  "lint": "eslint ./",
22
23
  "lint:ci": "pnpm lint --quiet",
23
24
  "lint:fix": "pnpm lint --fix",
25
+ "test": "vitest",
26
+ "test:ci": "pnpm test",
24
27
  "release": "semantic-release -e semantic-release-monorepo"
25
28
  },
26
29
  "homepage": "https://github.com/useinsider/config/tree/master/packages/eslint-config#readme",
@@ -52,6 +55,7 @@
52
55
  "@cspell/eslint-plugin": "6.19.2",
53
56
  "@stylistic/eslint-plugin": "1.4.1",
54
57
  "@stylistic/eslint-plugin-migrate": "1.4.1",
58
+ "eslint": "8.54.0",
55
59
  "eslint-config-airbnb-base": "15.0.0",
56
60
  "eslint-plugin-import": "2.29.0",
57
61
  "eslint-plugin-jsdoc": "46.9.0"
@@ -60,20 +64,25 @@
60
64
  "@semantic-release/changelog": "6.0.3",
61
65
  "@semantic-release/git": "10.0.1",
62
66
  "@types/eslint": "8.44.8",
67
+ "@types/fs-extra": "11.0.4",
63
68
  "@types/node": "20.10.2",
69
+ "@typescript-eslint/eslint-plugin": "6.13.2",
64
70
  "@useinsider/release-config": "workspace:*",
71
+ "@vitest/coverage-v8": "0.34.6",
72
+ "@vue/eslint-config-typescript": "12.0.0",
73
+ "eslint-plugin-vue": "9.19.2",
74
+ "eslint-plugin-vue-scoped-css": "2.5.1",
75
+ "fs-extra": "11.2.0",
65
76
  "semantic-release": "19.0.5",
66
- "semantic-release-monorepo": "7.0.5"
77
+ "semantic-release-monorepo": "7.0.5",
78
+ "vite-tsconfig-paths": "4.2.2",
79
+ "vitest": "0.34.6",
80
+ "vue": "3.3.13",
81
+ "vue-eslint-parser": "9.3.2"
67
82
  },
68
83
  "optionalDependencies": {
69
84
  "@rushstack/eslint-patch": ">=1.6.0",
70
85
  "@stylistic/eslint-plugin": ">=1.4.1",
71
- "@stylistic/eslint-plugin-migrate": ">=1.4.1",
72
- "@typescript-eslint/eslint-plugin": ">=6.13.1",
73
- "@vue/eslint-config-typescript": ">=12.0.0",
74
- "eslint": ">=8.54.0",
75
- "eslint-plugin-vue": ">=9.19.2",
76
- "eslint-plugin-vue-scoped-css": ">=2.5.1",
77
- "vue-eslint-parser": ">=9.3.2"
86
+ "@stylistic/eslint-plugin-migrate": ">=1.4.1"
78
87
  }
79
88
  }
@@ -71,7 +71,9 @@ module.exports = {
71
71
  'no-invalid-regexp': ['error'],
72
72
  'no-iterator': ['error'],
73
73
  'no-mixed-operators': 'off',
74
+ 'no-multi-spaces': 'off',
74
75
  'no-multi-str': ['error'],
76
+ 'no-multiple-empty-lines': 'off',
75
77
  'no-native-reassign': 'error',
76
78
  'no-nested-ternary': ['error'],
77
79
  'no-new': 'off',
@@ -82,6 +84,9 @@ module.exports = {
82
84
  }],
83
85
  'no-plusplus': 'off',
84
86
  'no-process-exit': ['error'],
87
+ 'no-promise-executor-return': ['error', {
88
+ allowVoid: true,
89
+ }],
85
90
  'no-return-assign': ['error', 'except-parens'],
86
91
  'no-self-compare': ['error'],
87
92
  'no-sequences': ['error'],
@@ -155,6 +160,7 @@ module.exports = {
155
160
  radix: ['error', 'as-needed'],
156
161
  semi: 'off',
157
162
  'space-before-function-paren': 'off',
163
+ 'space-in-parens': 'off',
158
164
  strict: ['error'],
159
165
  'use-isnan': ['error'],
160
166
  'valid-typeof': ['error'],
@@ -13,6 +13,9 @@ module.exports = {
13
13
  functions: 'never',
14
14
  imports: 'always-multiline',
15
15
  objects: 'always-multiline',
16
+ enums: 'always-multiline',
17
+ generics: 'always-multiline',
18
+ tuples: 'always-multiline',
16
19
  }],
17
20
  '@stylistic/comma-spacing': ['error'],
18
21
  '@stylistic/computed-property-spacing': ['error'],
@@ -110,5 +113,6 @@ module.exports = {
110
113
  '@stylistic/template-curly-spacing': ['error', 'never'],
111
114
  '@stylistic/template-tag-spacing': ['error', 'never'],
112
115
  '@stylistic/type-annotation-spacing': ['error'],
116
+ '@stylistic/type-generic-spacing': ['error'],
113
117
  },
114
118
  };
@@ -1,40 +1,33 @@
1
+ const overriddenRules = {
2
+ indent: 'off',
3
+ 'no-undef': 'off',
4
+ 'no-shadow': 'off',
5
+ '@typescript-eslint/comma-dangle': 'off',
6
+ 'no-extra-parens': 'off',
7
+ '@typescript-eslint/no-extra-parens': 'off',
8
+ '@typescript-eslint/space-before-function-paren': 'off',
9
+ 'no-unused-vars': 'off',
10
+ 'no-useless-constructor': 'off',
11
+ '@typescript-eslint/indent': 'off',
12
+ semi: 'off',
13
+ '@typescript-eslint/semi': 'off',
14
+ 'react/jsx-filename-extension': 'off',
15
+ 'no-use-before-define': 'off',
16
+ '@typescript-eslint/lines-between-class-members': 'off',
17
+ '@typescript-eslint/comma-spacing': 'off',
18
+ '@typescript-eslint/space-before-blocks': 'off',
19
+ };
20
+
1
21
  module.exports = {
2
22
  rules: {
3
- indent: 'off',
4
- 'no-undef': 'off',
5
- '@typescript-eslint/comma-dangle': ['error', {
6
- arrays: 'always-multiline',
7
- exports: 'always-multiline',
8
- functions: 'never',
9
- imports: 'always-multiline',
10
- objects: 'always-multiline',
11
- }],
12
- 'no-extra-parens': 'off',
13
- '@typescript-eslint/no-extra-parens': ['error', 'all', {
14
- enforceForArrowConditionals: false,
15
- nestedBinaryExpressions: false,
16
- returnAssign: false,
17
- }],
18
- '@typescript-eslint/space-before-function-paren': ['error', {
19
- anonymous: 'always',
20
- named: 'always',
21
- }],
22
- 'no-unused-vars': 'off',
23
+ ...overriddenRules,
24
+ '@typescript-eslint/no-shadow': 'error',
23
25
  '@typescript-eslint/no-unused-vars': ['error'],
24
- 'no-useless-constructor': 'off',
25
- '@typescript-eslint/no-useless-constructor': 'error',
26
+ '@typescript-eslint/no-useless-constructor': ['error'],
26
27
  '@typescript-eslint/array-type': ['error', { default: 'array', readonly: 'array' }],
27
- '@typescript-eslint/indent': 'off',
28
- semi: 'off',
29
- '@typescript-eslint/semi': ['error', 'always'],
30
28
  '@typescript-eslint/no-misused-promises': ['error', {
31
29
  checksVoidReturn: { arguments: false },
32
30
  }],
33
- 'react/jsx-filename-extension': 'off',
34
- 'no-use-before-define': 'off',
35
31
  '@typescript-eslint/no-use-before-define': ['error'],
36
- '@typescript-eslint/lines-between-class-members': ['error', 'always', {
37
- exceptAfterSingleLine: true,
38
- }],
39
32
  },
40
33
  };
package/src/rules/vue.cjs CHANGED
@@ -3,6 +3,7 @@ module.exports = {
3
3
  rules: {
4
4
  'vue/array-bracket-newline': ['error'],
5
5
  'vue/array-bracket-spacing': ['error', 'never'],
6
+ 'vue/array-element-newline': ['error', 'consistent'],
6
7
  'vue/arrow-spacing': ['error'],
7
8
  'vue/attribute-hyphenation': ['error', 'always'],
8
9
  'vue/attributes-order': ['error', {
@@ -22,6 +23,9 @@ module.exports = {
22
23
  ],
23
24
  }],
24
25
  'vue/brace-style': ['error', '1tbs'],
26
+ 'vue/camelcase': ['error', {
27
+ allow: ['^\\$_'],
28
+ }],
25
29
  'vue/comma-dangle': ['error', {
26
30
  arrays: 'always-multiline',
27
31
  exports: 'always-multiline',
@@ -76,8 +80,10 @@ module.exports = {
76
80
  ignoreUrls: true,
77
81
  }],
78
82
  'vue/multi-word-component-names': 'off',
83
+ 'vue/multiline-ternary': ['error', 'always-multiline'],
79
84
  'vue/mustache-interpolation-spacing': ['error', 'always'],
80
85
  'vue/no-bare-strings-in-template': ['error'],
86
+ 'vue/no-console': ['error'],
81
87
  'vue/no-constant-condition': ['error'],
82
88
  'vue/no-empty-component-block': ['error'],
83
89
  'vue/no-empty-pattern': ['error'],
@@ -11,9 +11,9 @@ module.exports = {
11
11
  'plugin:@typescript-eslint/recommended-requiring-type-checking',
12
12
  require.resolve('../rules/core.cjs'),
13
13
  require.resolve('../rules/cspell.cjs'),
14
- require.resolve('../rules/stylistic.cjs'),
15
14
  require.resolve('../rules/jsdoc.cjs'),
16
15
  require.resolve('../rules/typescript.cjs'),
16
+ require.resolve('../rules/stylistic.cjs'),
17
17
  ],
18
18
  env: {
19
19
  node: true,
@@ -11,9 +11,9 @@ module.exports = {
11
11
  'plugin:@typescript-eslint/recommended-requiring-type-checking',
12
12
  require.resolve('../rules/core.cjs'),
13
13
  require.resolve('../rules/cspell.cjs'),
14
- require.resolve('../rules/stylistic.cjs'),
15
14
  require.resolve('../rules/jsdoc.cjs'),
16
15
  require.resolve('../rules/typescript.cjs'),
16
+ require.resolve('../rules/stylistic.cjs'),
17
17
  ],
18
18
  env: {
19
19
  browser: true,
@@ -25,10 +25,10 @@ extends. These are necessary for the configuration to work correctly:
25
25
  pnpm add -E -D \
26
26
  eslint-config-airbnb-base \
27
27
  eslint-config-airbnb-typescript \
28
- eslint-plugin-vue \
29
- eslint-plugin-vue-scoped-css \
30
28
  eslint-plugin-jsdoc \
31
29
  @cspell/eslint-plugin \
30
+ eslint-plugin-vue \
31
+ eslint-plugin-vue-scoped-css \
32
32
  @vue/eslint-config-typescript \
33
33
  @typescript-eslint/eslint-plugin \
34
34
  vue-eslint-parser
@@ -38,10 +38,10 @@ vue-eslint-parser
38
38
  npm install -E -D \
39
39
  eslint-config-airbnb-base \
40
40
  eslint-config-airbnb-typescript \
41
- eslint-plugin-vue \
42
- eslint-plugin-vue-scoped-css \
43
41
  eslint-plugin-jsdoc \
44
42
  @cspell/eslint-plugin \
43
+ eslint-plugin-vue \
44
+ eslint-plugin-vue-scoped-css \
45
45
  @vue/eslint-config-typescript \
46
46
  @typescript-eslint/eslint-plugin \
47
47
  vue-eslint-parser
@@ -60,7 +60,7 @@ module.exports = {
60
60
  {
61
61
  files: ['./src/**/*.vue'],
62
62
  extends: [
63
- '@useinsider/eslint-config/vue3',
63
+ '@useinsider/eslint-config/vue3-typescript',
64
64
  ],
65
65
  parserOptions: {
66
66
  project: ['./tsconfig.json'],