@atomicsmash/coding-standards 17.0.3-beta.0 → 18.0.0-beta.3
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/CHANGELOG.md +34 -0
- package/beta/eslint/index.js +165 -0
- package/package.json +12 -5
- package/typescript/base.json +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @atomicsmash/coding-standards
|
|
2
2
|
|
|
3
|
+
## 18.0.0-beta.3
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#533](https://github.com/AtomicSmash/packages/pull/533) [`7fd9db6`](https://github.com/AtomicSmash/packages/commit/7fd9db62a9359be302c865aeacf2e5dfc663c31a) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Update TS base config
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies []:
|
|
12
|
+
- @atomicsmash/eslint-config@18.0.0-beta.3
|
|
13
|
+
- @atomicsmash/browserslist-config@18.0.0-beta.3
|
|
14
|
+
|
|
15
|
+
## 18.0.0-beta.2
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [#526](https://github.com/AtomicSmash/packages/pull/526) [`45913a9`](https://github.com/AtomicSmash/packages/commit/45913a99257aabfadec1399e0c712fb3afd5f956) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Add beta flat config for ESLint
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies []:
|
|
24
|
+
- @atomicsmash/eslint-config@18.0.0-beta.2
|
|
25
|
+
- @atomicsmash/browserslist-config@18.0.0-beta.2
|
|
26
|
+
|
|
27
|
+
## 17.0.3-beta.1
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- [#524](https://github.com/AtomicSmash/packages/pull/524) [`b7b83b5`](https://github.com/AtomicSmash/packages/commit/b7b83b5414d7e6899a5ad0805d5d47390d233a78) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Dependency updates
|
|
32
|
+
|
|
33
|
+
- Updated dependencies [[`b7b83b5`](https://github.com/AtomicSmash/packages/commit/b7b83b5414d7e6899a5ad0805d5d47390d233a78)]:
|
|
34
|
+
- @atomicsmash/eslint-config@17.0.3-beta.1
|
|
35
|
+
- @atomicsmash/browserslist-config@17.0.3-beta.1
|
|
36
|
+
|
|
3
37
|
## 17.0.3-beta.0
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
const OFF = 0;
|
|
2
|
+
const WARN = 1;
|
|
3
|
+
const ERROR = 2;
|
|
4
|
+
|
|
5
|
+
import js from "@eslint/js";
|
|
6
|
+
import esLintComments from "@eslint-community/eslint-plugin-eslint-comments";
|
|
7
|
+
import { defineConfig } from "eslint/config";
|
|
8
|
+
import importPlugin from "eslint-plugin-import";
|
|
9
|
+
import { playwrightConfigs } from "eslint-plugin-playwright";
|
|
10
|
+
import reactPlugin from "eslint-plugin-react";
|
|
11
|
+
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
12
|
+
import globals from "globals";
|
|
13
|
+
import tseslint from "typescript-eslint";
|
|
14
|
+
|
|
15
|
+
export const config = defineConfig([
|
|
16
|
+
{
|
|
17
|
+
files: [
|
|
18
|
+
"**/*.js",
|
|
19
|
+
"**/*.cjs",
|
|
20
|
+
"**/*.mjs",
|
|
21
|
+
"**/*.ts",
|
|
22
|
+
"**/*.cts",
|
|
23
|
+
"**/*.mts",
|
|
24
|
+
],
|
|
25
|
+
extends: [
|
|
26
|
+
js.configs.recommended,
|
|
27
|
+
esLintComments.configs.recommended,
|
|
28
|
+
tseslint.configs.strictTypeChecked,
|
|
29
|
+
tseslint.configs.stylisticTypeChecked,
|
|
30
|
+
importPlugin.flatConfigs.typescript,
|
|
31
|
+
],
|
|
32
|
+
plugins: {
|
|
33
|
+
"@typescript-eslint": tseslint.plugin,
|
|
34
|
+
import: importPlugin,
|
|
35
|
+
},
|
|
36
|
+
languageOptions: {
|
|
37
|
+
ecmaVersion: 2022,
|
|
38
|
+
sourceType: "module",
|
|
39
|
+
globals: {
|
|
40
|
+
...globals.browser,
|
|
41
|
+
...globals.node,
|
|
42
|
+
},
|
|
43
|
+
parser: tseslint.parser,
|
|
44
|
+
parserOptions: {
|
|
45
|
+
projectService: true,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
rules: {
|
|
49
|
+
"no-case-declarations": [OFF],
|
|
50
|
+
"import/order": [
|
|
51
|
+
ERROR,
|
|
52
|
+
{
|
|
53
|
+
alphabetize: {
|
|
54
|
+
order: "asc",
|
|
55
|
+
},
|
|
56
|
+
groups: [
|
|
57
|
+
"type",
|
|
58
|
+
"builtin",
|
|
59
|
+
"external",
|
|
60
|
+
"internal",
|
|
61
|
+
"parent",
|
|
62
|
+
["sibling", "index"],
|
|
63
|
+
],
|
|
64
|
+
"newlines-between": "ignore",
|
|
65
|
+
pathGroups: [],
|
|
66
|
+
pathGroupsExcludedImportTypes: [],
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
"prefer-const": [ERROR],
|
|
70
|
+
"no-var": [ERROR],
|
|
71
|
+
"import/no-duplicates": WARN,
|
|
72
|
+
"eslint-comments/no-unused-disable": [ERROR],
|
|
73
|
+
"eslint-comments/require-description": [
|
|
74
|
+
ERROR,
|
|
75
|
+
{ ignore: ["eslint-enable"] },
|
|
76
|
+
],
|
|
77
|
+
"@typescript-eslint/naming-convention": [
|
|
78
|
+
ERROR,
|
|
79
|
+
{
|
|
80
|
+
selector: "variableLike",
|
|
81
|
+
format: ["camelCase", "PascalCase", "UPPER_CASE"],
|
|
82
|
+
leadingUnderscore: "allow",
|
|
83
|
+
},
|
|
84
|
+
{ selector: "function", format: ["camelCase", "PascalCase"] },
|
|
85
|
+
{ selector: "typeLike", format: ["PascalCase"] },
|
|
86
|
+
{
|
|
87
|
+
selector: "variable",
|
|
88
|
+
types: ["boolean"],
|
|
89
|
+
format: ["PascalCase"],
|
|
90
|
+
prefix: ["is", "should", "has", "can", "did", "will", "are"],
|
|
91
|
+
leadingUnderscore: "allow",
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
"@typescript-eslint/consistent-type-definitions": [ERROR, "type"],
|
|
95
|
+
"@typescript-eslint/non-nullable-type-assertion-style": OFF,
|
|
96
|
+
"@typescript-eslint/no-unused-vars": [
|
|
97
|
+
ERROR,
|
|
98
|
+
{
|
|
99
|
+
args: "all",
|
|
100
|
+
argsIgnorePattern: "^_",
|
|
101
|
+
caughtErrors: "all",
|
|
102
|
+
caughtErrorsIgnorePattern: "^_",
|
|
103
|
+
destructuredArrayIgnorePattern: "^_",
|
|
104
|
+
varsIgnorePattern: "^_",
|
|
105
|
+
ignoreRestSiblings: true,
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
files: ["*.cjs"],
|
|
112
|
+
languageOptions: {
|
|
113
|
+
sourceType: "commonjs",
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
files: ["*.mjs"],
|
|
118
|
+
languageOptions: {
|
|
119
|
+
sourceType: "module",
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
files: ["**/*.test.*"],
|
|
124
|
+
rules: {
|
|
125
|
+
"@typescript-eslint/no-unused-vars": [OFF],
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
files: ["**/*.jsx", "**/*.tsx"],
|
|
130
|
+
extends: [
|
|
131
|
+
reactPlugin.configs.flat.recommended,
|
|
132
|
+
reactPlugin.configs.flat["jsx-runtime"],
|
|
133
|
+
reactHooksPlugin.configs.flat["recommended-latest"],
|
|
134
|
+
],
|
|
135
|
+
settings: {
|
|
136
|
+
react: {
|
|
137
|
+
version: "detect",
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
rules: {
|
|
141
|
+
"react-hooks/exhaustive-deps": [
|
|
142
|
+
WARN,
|
|
143
|
+
{
|
|
144
|
+
additionalHooks: "(useSelect|useSuspenseSelect)",
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
]);
|
|
150
|
+
|
|
151
|
+
export const playwrightConfig = defineConfig([
|
|
152
|
+
{
|
|
153
|
+
extends: [playwrightConfigs["flat/recommended"]],
|
|
154
|
+
rules: {
|
|
155
|
+
"playwright/expect-expect": [
|
|
156
|
+
ERROR,
|
|
157
|
+
{
|
|
158
|
+
assertFunctionNames: [
|
|
159
|
+
"playAudit", // This is the lighthouse playwright test, which contains threshold assertions.
|
|
160
|
+
],
|
|
161
|
+
},
|
|
162
|
+
],
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
]);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atomicsmash/coding-standards",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "18.0.0-beta.3",
|
|
5
5
|
"description": "A collection of coding standards configurations.",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"types": "index.d.ts",
|
|
@@ -9,15 +9,22 @@
|
|
|
9
9
|
"@cspell/cspell-types": "^9.7.0"
|
|
10
10
|
},
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"@atomicsmash/browserslist-config": "^
|
|
13
|
-
"@atomicsmash/eslint-config": "^
|
|
14
|
-
"@
|
|
12
|
+
"@atomicsmash/browserslist-config": "^18.0.0-beta.3",
|
|
13
|
+
"@atomicsmash/eslint-config": "^18.0.0-beta.3",
|
|
14
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
15
|
+
"@eslint/js": "^8.57.1",
|
|
16
|
+
"@wordpress/stylelint-config": "^23.33.0",
|
|
17
|
+
"eslint": "^8.57.1",
|
|
18
|
+
"eslint-config-prettier": "^8.10.2",
|
|
19
|
+
"eslint-plugin-import": "^2.32.0",
|
|
20
|
+
"globals": "^13.24.0",
|
|
15
21
|
"prettier": "^3.8.1",
|
|
16
22
|
"stylelint": "^16.26.1",
|
|
17
23
|
"stylelint-config-standard": "^39.0.1",
|
|
18
24
|
"stylelint-config-standard-scss": "^16.0.0",
|
|
19
25
|
"stylelint-no-restricted-syntax": "^2.2.1",
|
|
20
|
-
"stylelint-order": "^7.0.1"
|
|
26
|
+
"stylelint-order": "^7.0.1",
|
|
27
|
+
"typescript-eslint": "^8.50.0"
|
|
21
28
|
},
|
|
22
29
|
"keywords": [
|
|
23
30
|
"atomic",
|
package/typescript/base.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"esModuleInterop": true,
|
|
5
5
|
"skipLibCheck": true,
|
|
@@ -11,9 +11,11 @@
|
|
|
11
11
|
"strict": true,
|
|
12
12
|
"noUncheckedIndexedAccess": true,
|
|
13
13
|
"moduleResolution": "Bundler",
|
|
14
|
-
"module": "
|
|
14
|
+
"module": "Preserve",
|
|
15
15
|
"noEmit": true,
|
|
16
16
|
"checkJs": true,
|
|
17
|
-
"forceConsistentCasingInFileNames": true
|
|
17
|
+
"forceConsistentCasingInFileNames": true,
|
|
18
|
+
"verbatimModuleSyntax": true,
|
|
19
|
+
"noImplicitOverride": true
|
|
18
20
|
}
|
|
19
21
|
}
|