@frontify/eslint-config-basic 0.15.3 → 0.17.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.
Files changed (2) hide show
  1. package/index.js +73 -10
  2. package/package.json +6 -2
package/index.js CHANGED
@@ -6,8 +6,23 @@ module.exports = {
6
6
  browser: true,
7
7
  node: true,
8
8
  },
9
- plugins: ['html', 'unicorn', 'prettier'],
10
- extends: ['plugin:jsonc/recommended-with-jsonc', 'plugin:prettier/recommended'],
9
+ plugins: ['html', 'unicorn', 'no-only-tests', 'prettier'],
10
+ extends: [
11
+ 'plugin:jsonc/recommended-with-jsonc',
12
+ 'plugin:yml/standard',
13
+ 'plugin:markdown/recommended',
14
+ 'plugin:prettier/recommended',
15
+ ],
16
+ ignorePatterns: [
17
+ '*.min.*',
18
+ 'dist',
19
+ 'LICENSE*',
20
+ 'coverage',
21
+ 'temp',
22
+ 'package-lock.json',
23
+ 'pnpm-lock.yaml',
24
+ 'yarn.lock',
25
+ ],
11
26
  overrides: [
12
27
  {
13
28
  files: ['*.json', '*.json5'],
@@ -16,11 +31,25 @@ module.exports = {
16
31
  quotes: ['error', 'double'],
17
32
  'quote-props': ['error', 'always'],
18
33
  'comma-dangle': ['error', 'never'],
34
+ semi: 'off',
35
+ 'jsonc/array-bracket-spacing': ['error', 'never'],
36
+ 'jsonc/comma-dangle': ['error', 'never'],
37
+ 'jsonc/comma-style': ['error', 'last'],
38
+ 'jsonc/key-spacing': ['error', { beforeColon: false, afterColon: true }],
39
+ 'jsonc/no-octal-escape': 'error',
40
+ 'jsonc/object-curly-newline': ['error', { multiline: true, consistent: true }],
41
+ 'jsonc/object-curly-spacing': ['error', 'always'],
42
+ 'jsonc/object-property-newline': ['error', { allowMultiplePropertiesPerLine: true }],
19
43
  },
20
44
  },
21
45
  {
22
46
  files: ['*.yaml', '*.yml'],
23
47
  parser: 'yaml-eslint-parser',
48
+ rules: {
49
+ 'spaced-comment': 'off',
50
+ 'yml/quotes': ['error', { prefer: 'single', avoidEscape: false }],
51
+ 'yml/no-empty-document': 'off',
52
+ },
24
53
  },
25
54
  {
26
55
  files: ['package.json'],
@@ -31,28 +60,48 @@ module.exports = {
31
60
  {
32
61
  pathPattern: '^$',
33
62
  order: [
63
+ 'publisher',
34
64
  'name',
65
+ 'displayName',
66
+ 'type',
35
67
  'version',
68
+ 'private',
69
+ 'packageManager',
36
70
  'description',
37
- 'keywords',
71
+ 'author',
38
72
  'license',
39
- 'repository',
40
73
  'funding',
41
- 'author',
42
- 'type',
43
- 'files',
74
+ 'homepage',
75
+ 'repository',
76
+ 'bugs',
77
+ 'keywords',
78
+ 'categories',
79
+ 'sideEffects',
44
80
  'exports',
45
81
  'main',
46
82
  'module',
47
83
  'unpkg',
84
+ 'jsdelivr',
85
+ 'types',
86
+ 'typesVersions',
48
87
  'bin',
88
+ 'icon',
89
+ 'files',
90
+ 'engines',
91
+ 'activationEvents',
92
+ 'contributes',
49
93
  'scripts',
50
- 'husky',
51
- 'lint-staged',
52
94
  'peerDependencies',
53
95
  'peerDependenciesMeta',
54
96
  'dependencies',
97
+ 'optionalDependencies',
55
98
  'devDependencies',
99
+ 'pnpm',
100
+ 'overrides',
101
+ 'resolutions',
102
+ 'husky',
103
+ 'simple-git-hooks',
104
+ 'lint-staged',
56
105
  'eslintConfig',
57
106
  ],
58
107
  },
@@ -60,6 +109,10 @@ module.exports = {
60
109
  pathPattern: '^(?:dev|peer|optional|bundled)?[Dd]ependencies$',
61
110
  order: { type: 'asc' },
62
111
  },
112
+ {
113
+ pathPattern: '^exports.*$',
114
+ order: ['types', 'require', 'import'],
115
+ },
63
116
  ],
64
117
  },
65
118
  },
@@ -69,6 +122,12 @@ module.exports = {
69
122
  '@typescript-eslint/no-var-requires': 'off',
70
123
  },
71
124
  },
125
+ {
126
+ files: ['*.d.ts'],
127
+ rules: {
128
+ 'import/no-duplicates': 'off',
129
+ },
130
+ },
72
131
  {
73
132
  files: ['scripts/**/*.*'],
74
133
  rules: {
@@ -76,9 +135,10 @@ module.exports = {
76
135
  },
77
136
  },
78
137
  {
79
- files: ['*.test.ts', '*.test.js', '*.spec.ts', '*.spec.js'],
138
+ files: ['*.test.ts', '*.test.tsx', '*.test.js', '*.spec.ts', '*.spec.tsx', '*.spec.js'],
80
139
  rules: {
81
140
  'no-unused-expressions': 'off',
141
+ 'no-only-tests/no-only-tests': 'error',
82
142
  },
83
143
  },
84
144
  ],
@@ -134,6 +194,7 @@ module.exports = {
134
194
  'unicorn/no-this-assignment': 'error',
135
195
  'unicorn/no-unsafe-regex': 'error',
136
196
  'unicorn/no-useless-length-check': 'error',
197
+ 'unicorn/catch-error-name': 'error',
137
198
 
138
199
  'sort-imports': [
139
200
  'error',
@@ -145,5 +206,7 @@ module.exports = {
145
206
  allowSeparatedGroups: false,
146
207
  },
147
208
  ],
209
+
210
+ 'jsonc/no-dupe-keys': 'error',
148
211
  },
149
212
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontify/eslint-config-basic",
3
- "version": "0.15.3",
3
+ "version": "0.17.0",
4
4
  "main": "index.js",
5
5
  "author": "Frontify Developers <developers@frontify.com>",
6
6
  "license": "MIT",
@@ -27,10 +27,14 @@
27
27
  "eslint-config-prettier": "^8.5.0",
28
28
  "eslint-plugin-html": "^7.1.0",
29
29
  "eslint-plugin-jsonc": "^2.5.0",
30
+ "eslint-plugin-markdown": "^3.0.0",
31
+ "eslint-plugin-no-only-tests": "^3.1.0",
30
32
  "eslint-plugin-node": "^11.1.0",
31
33
  "eslint-plugin-prettier": "^4.2.1",
32
34
  "eslint-plugin-promise": "^6.1.1",
33
- "eslint-plugin-unicorn": "^44.0.2"
35
+ "eslint-plugin-unicorn": "^44.0.2",
36
+ "eslint-plugin-yml": "^1.2.0",
37
+ "yaml-eslint-parser": "^1.1.0"
34
38
  },
35
39
  "scripts": {
36
40
  "lint": "eslint . --config=index.js"