@atomicsmash/coding-standards 18.0.0-beta.6 → 18.0.0-beta.8

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 (57) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cspell/index.d.ts +15 -0
  3. package/dist/cspell/index.d.ts.map +1 -0
  4. package/dist/cspell/index.js +133 -0
  5. package/dist/eslint/index.d.ts +4 -0
  6. package/dist/eslint/index.d.ts.map +1 -0
  7. package/dist/eslint/index.js +198 -0
  8. package/dist/index.d.ts +6 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +5 -0
  11. package/dist/prettier/index.d.ts +13 -0
  12. package/dist/prettier/index.d.ts.map +1 -0
  13. package/dist/prettier/index.js +32 -0
  14. package/dist/stylelint/base.d.ts +69 -0
  15. package/dist/stylelint/base.d.ts.map +1 -0
  16. package/dist/stylelint/base.js +86 -0
  17. package/dist/stylelint/classic.d.ts +69 -0
  18. package/dist/stylelint/classic.d.ts.map +1 -0
  19. package/dist/stylelint/classic.js +2 -0
  20. package/dist/stylelint/index.d.ts +161 -0
  21. package/dist/stylelint/index.d.ts.map +1 -0
  22. package/dist/stylelint/index.js +4 -0
  23. package/dist/stylelint/tailwind.d.ts +21 -0
  24. package/dist/stylelint/tailwind.d.ts.map +1 -0
  25. package/dist/stylelint/tailwind.js +38 -0
  26. package/dist/stylelint/theme-json.d.ts +73 -0
  27. package/dist/stylelint/theme-json.d.ts.map +1 -0
  28. package/dist/stylelint/theme-json.js +169 -0
  29. package/package.json +49 -12
  30. package/typescript/base.json +2 -1
  31. package/typescript/cypress.json +1 -1
  32. package/.eslintrc.cjs +0 -8
  33. package/beta/README.md +0 -3
  34. package/beta/eslint/index.js +0 -200
  35. package/cspell/index.cjs +0 -142
  36. package/cspell/index.js +0 -1
  37. package/cspell/index.mjs +0 -142
  38. package/index.d.ts +0 -7
  39. package/index.js +0 -5
  40. package/index.mjs +0 -4
  41. package/prettier/index.cjs +0 -35
  42. package/prettier/index.js +0 -1
  43. package/prettier/index.mjs +0 -35
  44. package/stylelint/base.cjs +0 -91
  45. package/stylelint/base.js +0 -1
  46. package/stylelint/base.mjs +0 -91
  47. package/stylelint/classic.cjs +0 -3
  48. package/stylelint/classic.js +0 -1
  49. package/stylelint/classic.mjs +0 -2
  50. package/stylelint/index.cjs +0 -5
  51. package/stylelint/index.mjs +0 -4
  52. package/stylelint/tailwind.cjs +0 -38
  53. package/stylelint/tailwind.js +0 -1
  54. package/stylelint/tailwind.mjs +0 -38
  55. package/stylelint/theme-json.cjs +0 -189
  56. package/stylelint/theme-json.js +0 -1
  57. package/stylelint/theme-json.mjs +0 -189
@@ -0,0 +1,69 @@
1
+ declare const _default: {
2
+ reportDescriptionlessDisables: true;
3
+ reportInvalidScopeDisables: true;
4
+ reportNeedlessDisables: true;
5
+ plugins: string[];
6
+ rules: {
7
+ "custom-property-pattern": null;
8
+ "function-url-quotes": string[];
9
+ "rule-empty-line-before": (string | {
10
+ except: string[];
11
+ ignore: string[];
12
+ })[];
13
+ "comment-empty-line-before": (string | {
14
+ except: string[];
15
+ ignore: string[];
16
+ })[];
17
+ "order/order": (string | {
18
+ type: string;
19
+ hasBlock: boolean;
20
+ })[];
21
+ "plugin/no-restricted-syntax": {
22
+ selector: string;
23
+ message: string;
24
+ }[][];
25
+ "selector-class-pattern": (string | {
26
+ message: string;
27
+ })[];
28
+ "at-rule-empty-line-before": (string | {
29
+ ignore: string[];
30
+ })[];
31
+ };
32
+ overrides: ({
33
+ files: string[];
34
+ extends: string[];
35
+ rules: {
36
+ "at-rule-no-unknown": (boolean | {
37
+ ignoreAtRules: string;
38
+ })[];
39
+ "scss/operator-no-newline-after"?: undefined;
40
+ "no-descending-specificity"?: undefined;
41
+ "scss/at-rule-no-unknown"?: undefined;
42
+ "declaration-property-value-allowed-list"?: undefined;
43
+ };
44
+ } | {
45
+ files: string[];
46
+ extends: string[];
47
+ rules: {
48
+ "scss/operator-no-newline-after": null;
49
+ "no-descending-specificity": null;
50
+ "scss/at-rule-no-unknown": (boolean | {
51
+ ignoreAtRules: string;
52
+ })[];
53
+ "at-rule-no-unknown"?: undefined;
54
+ "declaration-property-value-allowed-list"?: undefined;
55
+ };
56
+ } | {
57
+ files: string[];
58
+ rules: {
59
+ "declaration-property-value-allowed-list": null;
60
+ "at-rule-no-unknown"?: undefined;
61
+ "scss/operator-no-newline-after"?: undefined;
62
+ "no-descending-specificity"?: undefined;
63
+ "scss/at-rule-no-unknown"?: undefined;
64
+ };
65
+ extends?: undefined;
66
+ })[];
67
+ };
68
+ export default _default;
69
+ //# sourceMappingURL=classic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classic.d.ts","sourceRoot":"","sources":["../../src/stylelint/classic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAAuC"}
@@ -0,0 +1,2 @@
1
+ import config from "./base.js";
2
+ export default config;
@@ -0,0 +1,161 @@
1
+ declare const _default: {
2
+ classic: {
3
+ reportDescriptionlessDisables: true;
4
+ reportInvalidScopeDisables: true;
5
+ reportNeedlessDisables: true;
6
+ plugins: string[];
7
+ rules: {
8
+ "custom-property-pattern": null;
9
+ "function-url-quotes": string[];
10
+ "rule-empty-line-before": (string | {
11
+ except: string[];
12
+ ignore: string[];
13
+ })[];
14
+ "comment-empty-line-before": (string | {
15
+ except: string[];
16
+ ignore: string[];
17
+ })[];
18
+ "order/order": (string | {
19
+ type: string;
20
+ hasBlock: boolean;
21
+ })[];
22
+ "plugin/no-restricted-syntax": {
23
+ selector: string;
24
+ message: string;
25
+ }[][];
26
+ "selector-class-pattern": (string | {
27
+ message: string;
28
+ })[];
29
+ "at-rule-empty-line-before": (string | {
30
+ ignore: string[];
31
+ })[];
32
+ };
33
+ overrides: ({
34
+ files: string[];
35
+ extends: string[];
36
+ rules: {
37
+ "at-rule-no-unknown": (boolean | {
38
+ ignoreAtRules: string;
39
+ })[];
40
+ "scss/operator-no-newline-after"?: undefined;
41
+ "no-descending-specificity"?: undefined;
42
+ "scss/at-rule-no-unknown"?: undefined;
43
+ "declaration-property-value-allowed-list"?: undefined;
44
+ };
45
+ } | {
46
+ files: string[];
47
+ extends: string[];
48
+ rules: {
49
+ "scss/operator-no-newline-after": null;
50
+ "no-descending-specificity": null;
51
+ "scss/at-rule-no-unknown": (boolean | {
52
+ ignoreAtRules: string;
53
+ })[];
54
+ "at-rule-no-unknown"?: undefined;
55
+ "declaration-property-value-allowed-list"?: undefined;
56
+ };
57
+ } | {
58
+ files: string[];
59
+ rules: {
60
+ "declaration-property-value-allowed-list": null;
61
+ "at-rule-no-unknown"?: undefined;
62
+ "scss/operator-no-newline-after"?: undefined;
63
+ "no-descending-specificity"?: undefined;
64
+ "scss/at-rule-no-unknown"?: undefined;
65
+ };
66
+ extends?: undefined;
67
+ })[];
68
+ };
69
+ themeJson: {
70
+ rules: {
71
+ "declaration-property-value-allowed-list": (Record<string, string[]> | {
72
+ severity: string;
73
+ message: (property: string, value: string) => string;
74
+ })[];
75
+ "custom-property-pattern": null;
76
+ "function-url-quotes": string[];
77
+ "rule-empty-line-before": (string | {
78
+ except: string[];
79
+ ignore: string[];
80
+ })[];
81
+ "comment-empty-line-before": (string | {
82
+ except: string[];
83
+ ignore: string[];
84
+ })[];
85
+ "order/order": (string | {
86
+ type: string;
87
+ hasBlock: boolean;
88
+ })[];
89
+ "plugin/no-restricted-syntax": {
90
+ selector: string;
91
+ message: string;
92
+ }[][];
93
+ "selector-class-pattern": (string | {
94
+ message: string;
95
+ })[];
96
+ "at-rule-empty-line-before": (string | {
97
+ ignore: string[];
98
+ })[];
99
+ };
100
+ reportDescriptionlessDisables: true;
101
+ reportInvalidScopeDisables: true;
102
+ reportNeedlessDisables: true;
103
+ plugins: string[];
104
+ overrides: ({
105
+ files: string[];
106
+ extends: string[];
107
+ rules: {
108
+ "at-rule-no-unknown": (boolean | {
109
+ ignoreAtRules: string;
110
+ })[];
111
+ "scss/operator-no-newline-after"?: undefined;
112
+ "no-descending-specificity"?: undefined;
113
+ "scss/at-rule-no-unknown"?: undefined;
114
+ "declaration-property-value-allowed-list"?: undefined;
115
+ };
116
+ } | {
117
+ files: string[];
118
+ extends: string[];
119
+ rules: {
120
+ "scss/operator-no-newline-after": null;
121
+ "no-descending-specificity": null;
122
+ "scss/at-rule-no-unknown": (boolean | {
123
+ ignoreAtRules: string;
124
+ })[];
125
+ "at-rule-no-unknown"?: undefined;
126
+ "declaration-property-value-allowed-list"?: undefined;
127
+ };
128
+ } | {
129
+ files: string[];
130
+ rules: {
131
+ "declaration-property-value-allowed-list": null;
132
+ "at-rule-no-unknown"?: undefined;
133
+ "scss/operator-no-newline-after"?: undefined;
134
+ "no-descending-specificity"?: undefined;
135
+ "scss/at-rule-no-unknown"?: undefined;
136
+ };
137
+ extends?: undefined;
138
+ })[];
139
+ };
140
+ tailwind: {
141
+ overrides: ({
142
+ files: string[];
143
+ rules: {
144
+ "at-rule-no-unknown": (boolean | {
145
+ ignoreAtRules: string[];
146
+ })[];
147
+ "scss/at-rule-no-unknown"?: undefined;
148
+ };
149
+ } | {
150
+ files: string[];
151
+ rules: {
152
+ "scss/at-rule-no-unknown": (boolean | {
153
+ ignoreAtRules: string[];
154
+ })[];
155
+ "at-rule-no-unknown"?: undefined;
156
+ };
157
+ })[];
158
+ };
159
+ };
160
+ export default _default;
161
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stylelint/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAAgD"}
@@ -0,0 +1,4 @@
1
+ import { default as classic } from "./classic.js";
2
+ import { default as tailwind } from "./tailwind.js";
3
+ import { default as themeJson } from "./theme-json.js";
4
+ export default { classic, themeJson, tailwind };
@@ -0,0 +1,21 @@
1
+ declare const _default: {
2
+ overrides: ({
3
+ files: string[];
4
+ rules: {
5
+ "at-rule-no-unknown": (boolean | {
6
+ ignoreAtRules: string[];
7
+ })[];
8
+ "scss/at-rule-no-unknown"?: undefined;
9
+ };
10
+ } | {
11
+ files: string[];
12
+ rules: {
13
+ "scss/at-rule-no-unknown": (boolean | {
14
+ ignoreAtRules: string[];
15
+ })[];
16
+ "at-rule-no-unknown"?: undefined;
17
+ };
18
+ })[];
19
+ };
20
+ export default _default;
21
+ //# sourceMappingURL=tailwind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../../src/stylelint/tailwind.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,wBAqCmB"}
@@ -0,0 +1,38 @@
1
+ export default {
2
+ overrides: [
3
+ {
4
+ files: ["*.css", "**/*.css"],
5
+ rules: {
6
+ "at-rule-no-unknown": [
7
+ true,
8
+ {
9
+ ignoreAtRules: [
10
+ "tailwind",
11
+ "apply",
12
+ "variants",
13
+ "responsive",
14
+ "screen",
15
+ ],
16
+ },
17
+ ],
18
+ },
19
+ },
20
+ {
21
+ files: ["*.scss", "**/*.scss"],
22
+ rules: {
23
+ "scss/at-rule-no-unknown": [
24
+ true,
25
+ {
26
+ ignoreAtRules: [
27
+ "tailwind",
28
+ "apply",
29
+ "variants",
30
+ "responsive",
31
+ "screen",
32
+ ],
33
+ },
34
+ ],
35
+ },
36
+ },
37
+ ],
38
+ };
@@ -0,0 +1,73 @@
1
+ declare const _default: {
2
+ rules: {
3
+ "declaration-property-value-allowed-list": (Record<string, string[]> | {
4
+ severity: string;
5
+ message: (property: string, value: string) => string;
6
+ })[];
7
+ "custom-property-pattern": null;
8
+ "function-url-quotes": string[];
9
+ "rule-empty-line-before": (string | {
10
+ except: string[];
11
+ ignore: string[];
12
+ })[];
13
+ "comment-empty-line-before": (string | {
14
+ except: string[];
15
+ ignore: string[];
16
+ })[];
17
+ "order/order": (string | {
18
+ type: string;
19
+ hasBlock: boolean;
20
+ })[];
21
+ "plugin/no-restricted-syntax": {
22
+ selector: string;
23
+ message: string;
24
+ }[][];
25
+ "selector-class-pattern": (string | {
26
+ message: string;
27
+ })[];
28
+ "at-rule-empty-line-before": (string | {
29
+ ignore: string[];
30
+ })[];
31
+ };
32
+ reportDescriptionlessDisables: true;
33
+ reportInvalidScopeDisables: true;
34
+ reportNeedlessDisables: true;
35
+ plugins: string[];
36
+ overrides: ({
37
+ files: string[];
38
+ extends: string[];
39
+ rules: {
40
+ "at-rule-no-unknown": (boolean | {
41
+ ignoreAtRules: string;
42
+ })[];
43
+ "scss/operator-no-newline-after"?: undefined;
44
+ "no-descending-specificity"?: undefined;
45
+ "scss/at-rule-no-unknown"?: undefined;
46
+ "declaration-property-value-allowed-list"?: undefined;
47
+ };
48
+ } | {
49
+ files: string[];
50
+ extends: string[];
51
+ rules: {
52
+ "scss/operator-no-newline-after": null;
53
+ "no-descending-specificity": null;
54
+ "scss/at-rule-no-unknown": (boolean | {
55
+ ignoreAtRules: string;
56
+ })[];
57
+ "at-rule-no-unknown"?: undefined;
58
+ "declaration-property-value-allowed-list"?: undefined;
59
+ };
60
+ } | {
61
+ files: string[];
62
+ rules: {
63
+ "declaration-property-value-allowed-list": null;
64
+ "at-rule-no-unknown"?: undefined;
65
+ "scss/operator-no-newline-after"?: undefined;
66
+ "no-descending-specificity"?: undefined;
67
+ "scss/at-rule-no-unknown"?: undefined;
68
+ };
69
+ extends?: undefined;
70
+ })[];
71
+ };
72
+ export default _default;
73
+ //# sourceMappingURL=theme-json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-json.d.ts","sourceRoot":"","sources":["../../src/stylelint/theme-json.ts"],"names":[],"mappings":";;;;gCAqIuB,MAAM,SAAS,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgD5C,wBAMmB"}
@@ -0,0 +1,169 @@
1
+ import baseConfig from "./base.js";
2
+ function createAllowedPropertyList(values) {
3
+ const allowedPropertyList = {};
4
+ for (const { property, varInfo, shorthand = 1, additionalAllowedValues = [], } of values) {
5
+ const isRegexProperty = property instanceof RegExp;
6
+ const possibleValues = [];
7
+ const possibleVars = [
8
+ ...additionalAllowedValues.map((value) => value instanceof RegExp ? value.toString() : value),
9
+ `(var\\([\\s]*--wp--${varInfo.type}--${varInfo.slug}--([a-z-0-9]+[\\s]*)\\))`,
10
+ ];
11
+ if (isRegexProperty) {
12
+ possibleVars.push(`(var\\([\\s]*--[a-z-0-9]*${property.toString().slice(1, -1)}[a-z-0-9]*[\\s]*\\))`);
13
+ }
14
+ else if (property) {
15
+ possibleVars.push(`(var\\([\\s]*--[a-z-0-9]*${property}[a-z-0-9]*[\\s]*\\))`);
16
+ }
17
+ possibleValues.push(
18
+ // For each shorthand value, allow one of the possible values followed by a space, or allow it to be blank
19
+ `/^${shorthand > 1 ? `((${possibleVars.join("|")})[\\s]*){0,${(shorthand - 1).toString()}}` : ""}(${possibleVars.join("|")})$/`);
20
+ allowedPropertyList[property.toString()] = possibleValues;
21
+ if (!isRegexProperty) {
22
+ allowedPropertyList[`/--[a-z-0-9]*${property}[a-z-0-9]*/`] =
23
+ possibleValues;
24
+ }
25
+ }
26
+ return allowedPropertyList;
27
+ }
28
+ const rules = {
29
+ "declaration-property-value-allowed-list": [
30
+ createAllowedPropertyList([
31
+ {
32
+ property: /border((-top|-bottom)(-left|-right))?-radius/,
33
+ varInfo: {
34
+ type: "custom",
35
+ slug: "radius",
36
+ },
37
+ },
38
+ {
39
+ property: "border-radius",
40
+ varInfo: {
41
+ type: "custom",
42
+ slug: "radius",
43
+ },
44
+ shorthand: 4,
45
+ },
46
+ {
47
+ property: "box-shadow",
48
+ varInfo: {
49
+ type: "preset",
50
+ slug: "shadow",
51
+ },
52
+ additionalAllowedValues: ["none", "unset"],
53
+ },
54
+ {
55
+ property: /color/,
56
+ varInfo: {
57
+ type: "preset",
58
+ slug: "color",
59
+ },
60
+ additionalAllowedValues: ["inherit", "currentcolor"],
61
+ },
62
+ {
63
+ property: "background-color",
64
+ varInfo: {
65
+ type: "preset",
66
+ slug: "color",
67
+ },
68
+ additionalAllowedValues: ["transparent"],
69
+ },
70
+ {
71
+ property: "font-family",
72
+ varInfo: {
73
+ type: "preset",
74
+ slug: "font-family",
75
+ },
76
+ additionalAllowedValues: ["inherit"],
77
+ },
78
+ {
79
+ property: "font-size",
80
+ varInfo: {
81
+ type: "preset",
82
+ slug: "font-size",
83
+ },
84
+ additionalAllowedValues: ["inherit"],
85
+ },
86
+ {
87
+ property: /(?<!scroll-)margin/,
88
+ varInfo: {
89
+ type: "preset",
90
+ slug: "spacing",
91
+ },
92
+ shorthand: 4,
93
+ additionalAllowedValues: ["auto", "var\\(--wp--style--block-gap\\)"],
94
+ },
95
+ {
96
+ property: /padding/,
97
+ varInfo: {
98
+ type: "preset",
99
+ slug: "spacing",
100
+ },
101
+ shorthand: 4,
102
+ },
103
+ {
104
+ property: "z-index",
105
+ varInfo: {
106
+ type: "custom",
107
+ slug: "z-index",
108
+ },
109
+ },
110
+ ]),
111
+ {
112
+ severity: "warning",
113
+ message: (property, value) => {
114
+ // Until updated, property and value will always return undefined.
115
+ return `Most values for this type of property should be defined in theme.json. (declaration-property-value-allowed-list)`;
116
+ // The following code is not complete, it has been left to show how this function could provide more helpful error
117
+ // messages once an update to stylelint is possible.
118
+ let message = `Invalid property provided for ${property}.`;
119
+ let ruleKey;
120
+ if (property.includes("color")) {
121
+ ruleKey = "/color/";
122
+ }
123
+ else if (property.includes("margin")) {
124
+ ruleKey = "/margin/";
125
+ }
126
+ else if (property.includes("padding")) {
127
+ ruleKey = "/padding/";
128
+ }
129
+ else {
130
+ ruleKey = property;
131
+ }
132
+ switch (ruleKey) {
133
+ case "z-index": {
134
+ message = `z-index must use one of the values specified in the theme.json file under \`settings.custom.z-index\`.`;
135
+ break;
136
+ }
137
+ case "/color/": {
138
+ message = `Colour values must use one of the values specified in the theme.json file under \`settings.color.palette\`.`;
139
+ break;
140
+ }
141
+ case "/margin/": {
142
+ message = `Margin values must use one of the values specified in the theme.json file under \`settings.spacing.spacingSizes\`.`;
143
+ break;
144
+ }
145
+ case "/padding/": {
146
+ message = `Padding values must use one of the values specified in the theme.json file under \`settings.spacing.spacingSizes\`.`;
147
+ break;
148
+ }
149
+ case "font-size": {
150
+ message = `Font size values must use one of the values specified in the theme.json file under \`settings.typography.fontSizes\`.`;
151
+ break;
152
+ }
153
+ case "font-family": {
154
+ message = `Font family values must use one of the values specified in the theme.json file under \`settings.typography.fontFamilies\`.`;
155
+ break;
156
+ }
157
+ }
158
+ return `${message} Value provided: ${value} (declaration-property-value-allowed-list)`;
159
+ },
160
+ },
161
+ ],
162
+ };
163
+ export default {
164
+ ...baseConfig,
165
+ rules: {
166
+ ...baseConfig.rules,
167
+ ...rules,
168
+ },
169
+ };
package/package.json CHANGED
@@ -1,34 +1,62 @@
1
1
  {
2
2
  "name": "@atomicsmash/coding-standards",
3
3
  "type": "module",
4
- "version": "18.0.0-beta.6",
4
+ "version": "18.0.0-beta.8",
5
5
  "description": "A collection of coding standards configurations.",
6
- "main": "index.js",
7
- "types": "index.d.ts",
6
+ "files": [
7
+ "./dist/**/*",
8
+ "./typescript/**/*",
9
+ "./beta/**/*",
10
+ "CHANGELOG.md",
11
+ "MIGRATING.md",
12
+ "package.json"
13
+ ],
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.js"
18
+ },
19
+ "./cspell": {
20
+ "types": "./dist/cspell/index.d.ts",
21
+ "default": "./dist/cspell/index.js"
22
+ },
23
+ "./eslint": {
24
+ "types": "./dist/eslint/index.d.ts",
25
+ "default": "./dist/eslint/index.js"
26
+ },
27
+ "./prettier": {
28
+ "types": "./dist/prettier/index.d.ts",
29
+ "default": "./dist/prettier/index.js"
30
+ },
31
+ "./stylelint/*": {
32
+ "types": "./dist/stylelint/*.d.ts",
33
+ "default": "./dist/stylelint/*.js"
34
+ },
35
+ "./typescript/*": "./typescript/*.json",
36
+ "./beta/biome": "./beta/biome/biome.jsonc"
37
+ },
8
38
  "devDependencies": {
9
39
  "@cspell/cspell-types": "^9.7.0"
10
40
  },
11
41
  "peerDependencies": {
12
- "@atomicsmash/browserslist-config": "^18.0.0-beta.6",
13
- "@atomicsmash/eslint-config": "^18.0.0-beta.6",
14
- "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
15
- "@eslint/js": "^8.57.1",
42
+ "@atomicsmash/browserslist-config": "^18.0.0-beta.8",
43
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
44
+ "@eslint/js": "^10.0.1",
16
45
  "@wordpress/stylelint-config": "^23.33.0",
17
- "eslint": "^8.57.1",
18
- "eslint-config-prettier": "^8.10.2",
19
- "eslint-import-resolver-typescript": "^3.10.1",
46
+ "eslint": "^9.0.0",
47
+ "eslint-import-resolver-typescript": "^4.4.4",
20
48
  "eslint-plugin-import": "^2.32.0",
21
49
  "eslint-plugin-playwright": "^2.10.2",
22
50
  "eslint-plugin-react": "^7.37.5",
23
51
  "eslint-plugin-react-hooks": "^7.1.1",
24
- "globals": "^13.24.0",
52
+ "globals": "^17.6.0",
25
53
  "prettier": "^3.8.1",
26
54
  "stylelint": "^16.26.1",
27
55
  "stylelint-config-standard": "^39.0.1",
28
56
  "stylelint-config-standard-scss": "^16.0.0",
29
57
  "stylelint-no-restricted-syntax": "^2.2.1",
30
58
  "stylelint-order": "^7.0.1",
31
- "typescript-eslint": "^8.50.0"
59
+ "typescript-eslint": "^8.59.3"
32
60
  },
33
61
  "keywords": [
34
62
  "atomic",
@@ -50,5 +78,14 @@
50
78
  },
51
79
  "publishConfig": {
52
80
  "access": "public"
81
+ },
82
+ "scripts": {
83
+ "dev": "tsc --build --watch tsconfig.build.json",
84
+ "build": "npm-run-all clean compile",
85
+ "clean": "del-cli ./dist/ *.tsbuildinfo",
86
+ "compile": "tsc --build tsconfig.build.json",
87
+ "lint": "run-p lint:*",
88
+ "lint:eslint": "eslint --cache --cache-location ./node_modules/.cache/eslint . --ext .js,.ts,.jsx,.tsx",
89
+ "lint:types": "tsc"
53
90
  }
54
91
  }
@@ -16,6 +16,7 @@
16
16
  "checkJs": true,
17
17
  "forceConsistentCasingInFileNames": true,
18
18
  "verbatimModuleSyntax": true,
19
- "noImplicitOverride": true
19
+ "noImplicitOverride": true,
20
+ "strictNullChecks": true
20
21
  }
21
22
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "http://json.schemastore.org/tsconfig",
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "exclude": [
4
4
  "../node_modules/@types/jest",
5
5
  "../node_modules/@testing-library/jest-dom"
package/.eslintrc.cjs DELETED
@@ -1,8 +0,0 @@
1
- /** @type {import('eslint').Linter.Config} */
2
- module.exports = {
3
- extends: ["@atomicsmash/eslint-config"],
4
- parserOptions: {
5
- sourceType: "module",
6
- },
7
- ignorePatterns: ["**/*.d.ts"],
8
- };
package/beta/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Beta files
2
-
3
- Config files added to this folder are not stable. They are added here to avoid keeping a separate branch up to date with other configs, and also enable multiple beta configs in a single project.