@cherepanov.pavel/shareable-config 1.0.9 → 1.0.11

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.
@@ -22,4 +22,4 @@
22
22
  // need to check that it's working well
23
23
  // iulian-radu-at.find-unused-exports
24
24
  ],
25
- }
25
+ }
@@ -25,4 +25,4 @@
25
25
  ],
26
26
  // typescript multiline end
27
27
  },
28
- }
28
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cherepanov.pavel/shareable-config",
3
3
  "description": "setup for new repositories",
4
- "version": "1.0.9",
4
+ "version": "1.0.11",
5
5
  "type": "module",
6
6
  "devEngines": {
7
7
  "packageManager": {
@@ -47,7 +47,7 @@
47
47
  "lint:js": "eslint",
48
48
  "lint:js:fix": "npm run lint:js -- --fix",
49
49
  "lint:css": "stylelint \"./**/*.{css,vue}\" --ignore-path .gitignore --formatter verbose",
50
- "lint:css:fix": "npm run lint:css:files -- --fix"
50
+ "lint:css:fix": "npm run lint:css -- --fix"
51
51
  },
52
52
  "dependencies": {
53
53
  "@eslint/compat": "2.1.0",
@@ -2,6 +2,9 @@ import { defineConfig } from 'eslint/config';
2
2
  import jsonc from 'eslint-plugin-jsonc';
3
3
  import { ERROR } from '../rules/severity.js';
4
4
  import { jsFormatting } from '../rules/stylistic/index.js';
5
+ import { possibleProblemRules } from '../rules/javascript/possible-problems.js';
6
+ import { suggestionRules } from '../rules/javascript/suggestions.js';
7
+ import stylisticPlugin from '@stylistic/eslint-plugin';
5
8
 
6
9
  const JSON_BUT_JSONC_FILES = [
7
10
  '**/.vscode/*.json',
@@ -9,6 +12,7 @@ const JSON_BUT_JSONC_FILES = [
9
12
  '**/tsconfig*.json',
10
13
  ];
11
14
  const COMMON_RULES = {
15
+ '@stylistic/eol-last': jsFormatting['@stylistic/eol-last'],
12
16
  'jsonc/no-bigint-literals': ERROR,
13
17
  'jsonc/no-binary-expression': ERROR,
14
18
  'jsonc/no-binary-numeric-literals': ERROR,
@@ -27,11 +31,20 @@ const COMMON_RULES = {
27
31
  'jsonc/array-bracket-newline': jsFormatting['@stylistic/array-bracket-newline'],
28
32
  'jsonc/array-bracket-spacing': jsFormatting['@stylistic/array-bracket-spacing'],
29
33
  'jsonc/array-element-newline': jsFormatting['@stylistic/array-element-newline'],
34
+ 'jsonc/comma-dangle': jsFormatting['@stylistic/comma-dangle'],
35
+ 'jsonc/comma-style': jsFormatting['@stylistic/comma-style'],
30
36
  'jsonc/indent': [
31
37
  jsFormatting['@stylistic/indent'][0],
32
38
  jsFormatting['@stylistic/indent'][1],
33
39
  ],
34
- 'jsonc/comma-dangle': jsFormatting['@stylistic/comma-dangle'],
40
+ 'jsonc/key-spacing': jsFormatting['@stylistic/key-spacing'],
41
+ 'jsonc/no-dupe-keys': possibleProblemRules['no-dupe-keys'],
42
+ 'jsonc/no-floating-decimal': jsFormatting['@stylistic/no-floating-decimal'],
43
+ 'jsonc/no-irregular-whitespace': possibleProblemRules['no-irregular-whitespace'],
44
+ 'jsonc/no-octal-escape': suggestionRules['no-octal-escape'],
45
+ 'jsonc/no-octal': suggestionRules['no-octal'],
46
+ 'jsonc/no-sparse-arrays': ERROR,
47
+ 'jsonc/no-useless-escape': suggestionRules['no-useless-escape'],
35
48
  };
36
49
  const JSON_RULES = {
37
50
  'jsonc/no-comments': ERROR,
@@ -42,12 +55,14 @@ const JSON_RULES = {
42
55
  };
43
56
  const JSON_JSONC_RULES = {
44
57
  'jsonc/no-infinity': ERROR,
58
+ 'jsonc/no-multi-str': suggestionRules['no-multi-str'],
45
59
  };
46
60
 
47
61
 
48
62
  export default defineConfig([
49
63
  {
50
64
  plugins: {
65
+ '@stylistic': stylisticPlugin,
51
66
  jsonc,
52
67
  },
53
68
  },
@@ -28,7 +28,7 @@ export const possibleProblemRules = {
28
28
  'no-dupe-args': [ERROR],
29
29
  'no-dupe-class-members': [ERROR],
30
30
  'no-dupe-else-if': [ERROR],
31
- 'no-dupe-keys': [ERROR],
31
+ 'no-dupe-keys': [WARN],
32
32
  'no-duplicate-case': [ERROR],
33
33
  'no-duplicate-imports': [ERROR],
34
34
  'no-empty-character-class': [ERROR],
@@ -43,21 +43,6 @@ export default {
43
43
  '@stylistic/comma-style': [
44
44
  ERROR,
45
45
  'last',
46
- {
47
- exceptions: {
48
- ArrayExpression: false,
49
- ArrayPattern: false,
50
- ArrowFunctionExpression: false,
51
- CallExpression: false,
52
- FunctionDeclaration: false,
53
- FunctionExpression: false,
54
- ImportDeclaration: false,
55
- NewExpression: false,
56
- ObjectExpression: false,
57
- ObjectPattern: false,
58
- VariableDeclaration: false,
59
- },
60
- },
61
46
  ],
62
47
  '@stylistic/computed-property-spacing': [
63
48
  ERROR,
@@ -101,7 +86,11 @@ export default {
101
86
  ],
102
87
  '@stylistic/key-spacing': [
103
88
  ERROR,
104
- { beforeColon: false, afterColon: true },
89
+ {
90
+ beforeColon: false,
91
+ afterColon: true,
92
+ mode: 'strict',
93
+ },
105
94
  ],
106
95
  '@stylistic/keyword-spacing': [
107
96
  ERROR,
@@ -1,3 +1,4 @@
1
+ import { possibleProblemRules } from '../javascript/possible-problems.js';
1
2
  import { ERROR, OFF } from '../severity.js';
2
3
 
3
4
  export const suggestionRules = {
@@ -31,7 +32,7 @@ export const suggestionRules = {
31
32
  'vue/no-deprecated-v-on-native-modifier': [ERROR],
32
33
  'vue/no-deprecated-v-on-number-modifiers': [ERROR],
33
34
  'vue/no-deprecated-vue-config-keycodes': [ERROR],
34
- 'vue/no-dupe-keys': [ERROR],
35
+ 'vue/no-dupe-keys': possibleProblemRules['no-dupe-keys'],
35
36
  'vue/no-dupe-v-else-if': [ERROR],
36
37
  'vue/no-duplicate-attributes': [ERROR],
37
38
  'vue/no-export-in-script-setup': [ERROR],
@@ -1,4 +1,4 @@
1
- import { INDENT_SIZE } from '../../eslint-config/rules/constants';
1
+ import { INDENT_SIZE } from '../../eslint-config/rules/constants.js';
2
2
 
3
3
  const MAX_EMPTY_LINES = 1;
4
4
  // const MAX_LINE_LENGTH = 80;