@frontify/eslint-config-basic 0.16.0 → 0.17.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.
Files changed (2) hide show
  1. package/index.js +72 -20
  2. package/package.json +11 -8
package/index.js CHANGED
@@ -6,8 +6,23 @@ module.exports = {
6
6
  browser: true,
7
7
  node: true,
8
8
  },
9
- plugins: ['html', 'unicorn', 'notice', '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
  ],
@@ -124,7 +184,6 @@ module.exports = {
124
184
  'unicorn/prefer-default-parameters': 'error',
125
185
  'unicorn/prefer-array-find': 'error',
126
186
  'unicorn/no-array-for-each': 'error',
127
- 'unicorn/error-message': 'error',
128
187
  'unicorn/custom-error-definition': 'error',
129
188
  'unicorn/better-regex': 'error',
130
189
  'unicorn/explicit-length-check': 'error',
@@ -134,6 +193,7 @@ module.exports = {
134
193
  'unicorn/no-this-assignment': 'error',
135
194
  'unicorn/no-unsafe-regex': 'error',
136
195
  'unicorn/no-useless-length-check': 'error',
196
+ 'unicorn/catch-error-name': 'error',
137
197
 
138
198
  'sort-imports': [
139
199
  'error',
@@ -146,14 +206,6 @@ module.exports = {
146
206
  },
147
207
  ],
148
208
 
149
- 'notice/notice': [
150
- 'error',
151
- {
152
- template: '/* (c) Copyright Frontify Ltd., all rights reserved. */\n\n',
153
- messages: {
154
- whenFailedToMatch: 'No Frontify copyright header set.',
155
- },
156
- },
157
- ],
209
+ 'jsonc/no-dupe-keys': 'error',
158
210
  },
159
211
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontify/eslint-config-basic",
3
- "version": "0.16.0",
3
+ "version": "0.17.1",
4
4
  "main": "index.js",
5
5
  "author": "Frontify Developers <developers@frontify.com>",
6
6
  "license": "MIT",
@@ -17,21 +17,24 @@
17
17
  },
18
18
  "peerDependencies": {
19
19
  "eslint": ">=8.27.0",
20
- "prettier": ">=2.7.0"
20
+ "prettier": ">=2.8.0"
21
21
  },
22
22
  "devDependencies": {
23
- "eslint": "8.27.0",
24
- "prettier": "2.7.1"
23
+ "eslint": "8.35.0",
24
+ "prettier": "2.8.4"
25
25
  },
26
26
  "dependencies": {
27
- "eslint-config-prettier": "^8.5.0",
27
+ "eslint-config-prettier": "^8.6.0",
28
28
  "eslint-plugin-html": "^7.1.0",
29
- "eslint-plugin-jsonc": "^2.5.0",
29
+ "eslint-plugin-jsonc": "^2.6.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
- "eslint-plugin-notice": "^0.9.10",
32
33
  "eslint-plugin-prettier": "^4.2.1",
33
34
  "eslint-plugin-promise": "^6.1.1",
34
- "eslint-plugin-unicorn": "^44.0.2"
35
+ "eslint-plugin-unicorn": "^45.0.2",
36
+ "eslint-plugin-yml": "^1.5.0",
37
+ "yaml-eslint-parser": "^1.1.0"
35
38
  },
36
39
  "scripts": {
37
40
  "lint": "eslint . --config=index.js"