@atomicsmash/coding-standards 18.0.0-beta.5 → 18.0.0-beta.7
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 +25 -0
- package/dist/cspell/index.d.ts +15 -0
- package/dist/cspell/index.d.ts.map +1 -0
- package/dist/cspell/index.js +133 -0
- package/dist/eslint/index.d.ts +4 -0
- package/dist/eslint/index.d.ts.map +1 -0
- package/dist/eslint/index.js +198 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/prettier/index.d.ts +13 -0
- package/dist/prettier/index.d.ts.map +1 -0
- package/dist/prettier/index.js +32 -0
- package/dist/stylelint/base.d.ts +69 -0
- package/dist/stylelint/base.d.ts.map +1 -0
- package/dist/stylelint/base.js +86 -0
- package/dist/stylelint/classic.d.ts +69 -0
- package/dist/stylelint/classic.d.ts.map +1 -0
- package/dist/stylelint/classic.js +2 -0
- package/dist/stylelint/index.d.ts +161 -0
- package/dist/stylelint/index.d.ts.map +1 -0
- package/dist/stylelint/index.js +4 -0
- package/dist/stylelint/tailwind.d.ts +21 -0
- package/dist/stylelint/tailwind.d.ts.map +1 -0
- package/dist/stylelint/tailwind.js +38 -0
- package/dist/stylelint/theme-json.d.ts +73 -0
- package/dist/stylelint/theme-json.d.ts.map +1 -0
- package/dist/stylelint/theme-json.js +169 -0
- package/package.json +49 -12
- package/typescript/base.json +2 -1
- package/typescript/cypress.json +1 -1
- package/.eslintrc.cjs +0 -8
- package/beta/README.md +0 -3
- package/beta/eslint/index.js +0 -171
- package/cspell/index.cjs +0 -142
- package/cspell/index.js +0 -1
- package/cspell/index.mjs +0 -142
- package/index.d.ts +0 -7
- package/index.js +0 -5
- package/index.mjs +0 -4
- package/prettier/index.cjs +0 -35
- package/prettier/index.js +0 -1
- package/prettier/index.mjs +0 -35
- package/stylelint/base.cjs +0 -91
- package/stylelint/base.js +0 -1
- package/stylelint/base.mjs +0 -91
- package/stylelint/classic.cjs +0 -3
- package/stylelint/classic.js +0 -1
- package/stylelint/classic.mjs +0 -2
- package/stylelint/index.cjs +0 -5
- package/stylelint/index.mjs +0 -4
- package/stylelint/tailwind.cjs +0 -38
- package/stylelint/tailwind.js +0 -1
- package/stylelint/tailwind.mjs +0 -38
- package/stylelint/theme-json.cjs +0 -189
- package/stylelint/theme-json.js +0 -1
- package/stylelint/theme-json.mjs +0 -189
package/beta/eslint/index.js
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
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/configs";
|
|
7
|
-
import { defineConfig } from "eslint/config";
|
|
8
|
-
import importPlugin from "eslint-plugin-import";
|
|
9
|
-
import { default as playwrightPlugin } 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.recommended,
|
|
28
|
-
tseslint.configs.strictTypeChecked,
|
|
29
|
-
tseslint.configs.stylisticTypeChecked,
|
|
30
|
-
importPlugin.flatConfigs.recommended,
|
|
31
|
-
importPlugin.flatConfigs.typescript,
|
|
32
|
-
],
|
|
33
|
-
plugins: {
|
|
34
|
-
"@typescript-eslint": tseslint.plugin,
|
|
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-community/eslint-comments/no-unused-disable": [ERROR],
|
|
73
|
-
"@eslint-community/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
|
-
settings: {
|
|
110
|
-
"import/resolver": {
|
|
111
|
-
typescript: true,
|
|
112
|
-
node: true,
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
files: ["*.cjs"],
|
|
118
|
-
languageOptions: {
|
|
119
|
-
sourceType: "commonjs",
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
files: ["*.mjs"],
|
|
124
|
-
languageOptions: {
|
|
125
|
-
sourceType: "module",
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
files: ["**/*.test.*"],
|
|
130
|
-
rules: {
|
|
131
|
-
"@typescript-eslint/no-unused-vars": [OFF],
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
files: ["**/*.jsx", "**/*.tsx"],
|
|
136
|
-
extends: [
|
|
137
|
-
reactPlugin.configs.flat.recommended,
|
|
138
|
-
reactPlugin.configs.flat["jsx-runtime"],
|
|
139
|
-
reactHooksPlugin.configs.flat.recommended,
|
|
140
|
-
],
|
|
141
|
-
settings: {
|
|
142
|
-
react: {
|
|
143
|
-
version: "detect",
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
rules: {
|
|
147
|
-
"react-hooks/exhaustive-deps": [
|
|
148
|
-
WARN,
|
|
149
|
-
{
|
|
150
|
-
additionalHooks: "(useSelect|useSuspenseSelect)",
|
|
151
|
-
},
|
|
152
|
-
],
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
]);
|
|
156
|
-
|
|
157
|
-
export const playwrightConfig = defineConfig([
|
|
158
|
-
{
|
|
159
|
-
extends: [playwrightPlugin.configs["flat/recommended"]],
|
|
160
|
-
rules: {
|
|
161
|
-
"playwright/expect-expect": [
|
|
162
|
-
ERROR,
|
|
163
|
-
{
|
|
164
|
-
assertFunctionNames: [
|
|
165
|
-
"playAudit", // This is the lighthouse playwright test, which contains threshold assertions.
|
|
166
|
-
],
|
|
167
|
-
},
|
|
168
|
-
],
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
]);
|
package/cspell/index.cjs
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
const fs = require("fs");
|
|
2
|
-
const path = require("path");
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Search for `package.json`
|
|
6
|
-
* @param {string} from - search `from` directory.
|
|
7
|
-
* @returns {string|void} - path to package.json
|
|
8
|
-
*/
|
|
9
|
-
function findNearestPackageJson(from) {
|
|
10
|
-
from = path.resolve(from);
|
|
11
|
-
const parent = path.dirname(from);
|
|
12
|
-
if (!from || parent === from) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const pkg = path.join(from, "package.json");
|
|
17
|
-
if (fs.existsSync(pkg)) {
|
|
18
|
-
return pkg;
|
|
19
|
-
}
|
|
20
|
-
return findNearestPackageJson(parent);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Load the nearest package.json
|
|
25
|
-
* @param {string} cwd
|
|
26
|
-
* @returns
|
|
27
|
-
*/
|
|
28
|
-
function loadPackageJson(cwd) {
|
|
29
|
-
const pkgFile = findNearestPackageJson(cwd);
|
|
30
|
-
if (!pkgFile) return;
|
|
31
|
-
return JSON.parse(fs.readFileSync(pkgFile, "utf-8"));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function determinePackageNamesAndMethods(cwd = process.cwd()) {
|
|
35
|
-
const packageImport = loadPackageJson(cwd) || {};
|
|
36
|
-
const packageNames = Object.keys(packageImport.dependencies || {}).concat(
|
|
37
|
-
Object.keys(packageImport.devDependencies || {}),
|
|
38
|
-
);
|
|
39
|
-
return { packageNames };
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Search for `composer.json`
|
|
44
|
-
* @param {string} from - search `from` directory.
|
|
45
|
-
* @returns {string|void} - path to composer.json
|
|
46
|
-
*/
|
|
47
|
-
function findNearestComposerJson(from) {
|
|
48
|
-
from = path.resolve(from);
|
|
49
|
-
const parent = path.dirname(from);
|
|
50
|
-
if (!from || parent === from) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const composerJsonPath = path.join(from, "composer.json");
|
|
55
|
-
if (fs.existsSync(composerJsonPath)) {
|
|
56
|
-
return composerJsonPath;
|
|
57
|
-
}
|
|
58
|
-
return findNearestComposerJson(parent);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Load the nearest composer.json
|
|
63
|
-
* @param {string} cwd
|
|
64
|
-
* @returns
|
|
65
|
-
*/
|
|
66
|
-
function loadComposer(cwd) {
|
|
67
|
-
const composerJsonFile = findNearestComposerJson(cwd);
|
|
68
|
-
if (!composerJsonFile) return;
|
|
69
|
-
return JSON.parse(fs.readFileSync(composerJsonFile, "utf-8"));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function determineComposerPackageNamesAndMethods(cwd = process.cwd()) {
|
|
73
|
-
const packageImport = loadComposer(cwd) || {};
|
|
74
|
-
const packageNames = Object.keys(packageImport.require || {})
|
|
75
|
-
.concat(Object.keys(packageImport["require-dev"] || {}))
|
|
76
|
-
.reduce((allowedWords, packageName) => {
|
|
77
|
-
return [...allowedWords, ...packageName.split("/")];
|
|
78
|
-
}, []);
|
|
79
|
-
return { packageNames };
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/** @type { import("@cspell/cspell-types").CSpellUserSettings } */
|
|
83
|
-
const config = {
|
|
84
|
-
language: "en-GB",
|
|
85
|
-
words: [
|
|
86
|
-
...[
|
|
87
|
-
...determinePackageNamesAndMethods().packageNames,
|
|
88
|
-
...determineComposerPackageNamesAndMethods().packageNames,
|
|
89
|
-
"commitlint",
|
|
90
|
-
"sass",
|
|
91
|
-
"Userback",
|
|
92
|
-
"phpcs",
|
|
93
|
-
"phpcbf",
|
|
94
|
-
], // package and language names
|
|
95
|
-
...["tsbuildinfo", "svgs"], // filenames
|
|
96
|
-
...["combobox", "spinbutton"], // accessible roles
|
|
97
|
-
...["popover", "dialog"], // custom element names
|
|
98
|
-
...["atomicsmash"], // company all lowercase
|
|
99
|
-
...["unstringified", "formattable", "keyof", "nonnullable", "hidable"], // coding actions
|
|
100
|
-
...[
|
|
101
|
-
"alignfull",
|
|
102
|
-
"alignleft",
|
|
103
|
-
"alignright",
|
|
104
|
-
"muplugin",
|
|
105
|
-
"textdomain",
|
|
106
|
-
"color", // For in theme.json
|
|
107
|
-
"gfield", // Gravity Forms field class
|
|
108
|
-
"phpmailer",
|
|
109
|
-
"WPMDB", // WP Migrate DB
|
|
110
|
-
"shortcode",
|
|
111
|
-
"wp_kses",
|
|
112
|
-
"sprintf", // For @wordpress/i18n
|
|
113
|
-
], // WordPress stuff
|
|
114
|
-
],
|
|
115
|
-
languageSettings: [
|
|
116
|
-
{
|
|
117
|
-
languageId: "*",
|
|
118
|
-
locale: "en-GB",
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
languageId: "css, less, scss, sass",
|
|
122
|
-
locale: "en-US",
|
|
123
|
-
dictionaries: ["css"],
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
languageId: "javascript,typescript,javascriptreact,typescriptreact",
|
|
127
|
-
locale: "en-GB",
|
|
128
|
-
dictionaries: ["typescript"],
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
languageId: "php",
|
|
132
|
-
locale: "en-GB",
|
|
133
|
-
dictionaries: ["php", "html"],
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
languageId: "html,vue-html,javascriptreact,typescriptreact",
|
|
137
|
-
locale: "en-GB",
|
|
138
|
-
dictionaries: ["html"],
|
|
139
|
-
},
|
|
140
|
-
],
|
|
141
|
-
};
|
|
142
|
-
module.exports = config;
|
package/cspell/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./index.mjs";
|
package/cspell/index.mjs
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from "fs";
|
|
2
|
-
import { resolve, dirname, join } from "path";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Search for `package.json`
|
|
6
|
-
* @param {string} from - search `from` directory.
|
|
7
|
-
* @returns {string|void} - path to package.json
|
|
8
|
-
*/
|
|
9
|
-
function findNearestPackageJson(from) {
|
|
10
|
-
from = resolve(from);
|
|
11
|
-
const parent = dirname(from);
|
|
12
|
-
if (!from || parent === from) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const pkg = join(from, "package.json");
|
|
17
|
-
if (existsSync(pkg)) {
|
|
18
|
-
return pkg;
|
|
19
|
-
}
|
|
20
|
-
return findNearestPackageJson(parent);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Load the nearest package.json
|
|
25
|
-
* @param {string} cwd
|
|
26
|
-
* @returns
|
|
27
|
-
*/
|
|
28
|
-
function loadPackageJson(cwd) {
|
|
29
|
-
const pkgFile = findNearestPackageJson(cwd);
|
|
30
|
-
if (!pkgFile) return;
|
|
31
|
-
return JSON.parse(readFileSync(pkgFile, "utf-8"));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function determinePackageNamesAndMethods(cwd = process.cwd()) {
|
|
35
|
-
const packageImport = loadPackageJson(cwd) || {};
|
|
36
|
-
const packageNames = Object.keys(packageImport.dependencies || {}).concat(
|
|
37
|
-
Object.keys(packageImport.devDependencies || {}),
|
|
38
|
-
);
|
|
39
|
-
return { packageNames };
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Search for `composer.json`
|
|
44
|
-
* @param {string} from - search `from` directory.
|
|
45
|
-
* @returns {string|void} - path to composer.json
|
|
46
|
-
*/
|
|
47
|
-
function findNearestComposerJson(from) {
|
|
48
|
-
from = resolve(from);
|
|
49
|
-
const parent = dirname(from);
|
|
50
|
-
if (!from || parent === from) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const composerJsonPath = join(from, "composer.json");
|
|
55
|
-
if (existsSync(composerJsonPath)) {
|
|
56
|
-
return composerJsonPath;
|
|
57
|
-
}
|
|
58
|
-
return findNearestComposerJson(parent);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Load the nearest composer.json
|
|
63
|
-
* @param {string} cwd
|
|
64
|
-
* @returns
|
|
65
|
-
*/
|
|
66
|
-
function loadComposer(cwd) {
|
|
67
|
-
const composerJsonFile = findNearestComposerJson(cwd);
|
|
68
|
-
if (!composerJsonFile) return;
|
|
69
|
-
return JSON.parse(readFileSync(composerJsonFile, "utf-8"));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function determineComposerPackageNamesAndMethods(cwd = process.cwd()) {
|
|
73
|
-
const packageImport = loadComposer(cwd) || {};
|
|
74
|
-
const packageNames = Object.keys(packageImport.require || {})
|
|
75
|
-
.concat(Object.keys(packageImport["require-dev"] || {}))
|
|
76
|
-
.reduce((allowedWords, packageName) => {
|
|
77
|
-
return [...allowedWords, ...packageName.split("/")];
|
|
78
|
-
}, []);
|
|
79
|
-
return { packageNames };
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/** @type { import("@cspell/cspell-types").CSpellUserSettings } */
|
|
83
|
-
const config = {
|
|
84
|
-
language: "en-GB",
|
|
85
|
-
words: [
|
|
86
|
-
...[
|
|
87
|
-
...determinePackageNamesAndMethods().packageNames,
|
|
88
|
-
...determineComposerPackageNamesAndMethods().packageNames,
|
|
89
|
-
"commitlint",
|
|
90
|
-
"sass",
|
|
91
|
-
"Userback",
|
|
92
|
-
"phpcs",
|
|
93
|
-
"phpcbf",
|
|
94
|
-
], // package and language names
|
|
95
|
-
...["tsbuildinfo", "svgs"], // filenames
|
|
96
|
-
...["combobox", "spinbutton"], // accessible roles
|
|
97
|
-
...["popover", "dialog"], // custom element names
|
|
98
|
-
...["atomicsmash"], // company all lowercase
|
|
99
|
-
...["unstringified", "formattable", "keyof", "nonnullable", "hidable"], // coding actions
|
|
100
|
-
...[
|
|
101
|
-
"alignfull",
|
|
102
|
-
"alignleft",
|
|
103
|
-
"alignright",
|
|
104
|
-
"muplugin",
|
|
105
|
-
"textdomain",
|
|
106
|
-
"color", // For in theme.json
|
|
107
|
-
"gfield", // Gravity Forms field class
|
|
108
|
-
"phpmailer",
|
|
109
|
-
"WPMDB", // WP Migrate DB
|
|
110
|
-
"shortcode",
|
|
111
|
-
"wp_kses",
|
|
112
|
-
"sprintf", // For @wordpress/i18n
|
|
113
|
-
], // WordPress stuff
|
|
114
|
-
],
|
|
115
|
-
languageSettings: [
|
|
116
|
-
{
|
|
117
|
-
languageId: "*",
|
|
118
|
-
locale: "en-GB",
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
languageId: "css, less, scss, sass",
|
|
122
|
-
locale: "en-US",
|
|
123
|
-
dictionaries: ["css"],
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
languageId: "javascript,typescript,javascriptreact,typescriptreact",
|
|
127
|
-
locale: "en-GB",
|
|
128
|
-
dictionaries: ["typescript"],
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
languageId: "php",
|
|
132
|
-
locale: "en-GB",
|
|
133
|
-
dictionaries: ["php", "html"],
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
languageId: "html,vue-html,javascriptreact,typescriptreact",
|
|
137
|
-
locale: "en-GB",
|
|
138
|
-
dictionaries: ["html"],
|
|
139
|
-
},
|
|
140
|
-
],
|
|
141
|
-
};
|
|
142
|
-
export default config;
|
package/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export const cspellConfig: import("@cspell/cspell-types").CSpellUserSettings;
|
|
2
|
-
export const prettierConfig: import("prettier").Config;
|
|
3
|
-
export const stylelintConfig: {
|
|
4
|
-
classic: import("stylelint").Config;
|
|
5
|
-
themeJson: import("stylelint").Config;
|
|
6
|
-
tailwind: import("stylelint").Config;
|
|
7
|
-
};
|
package/index.js
DELETED
package/index.mjs
DELETED
package/prettier/index.cjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
/* Expected defaults:
|
|
3
|
-
Prettier recommendation
|
|
4
|
-
printWidth: 80,
|
|
5
|
-
|
|
6
|
-
Single quotes are more often found in text strings (used for apostrophes) so using double quotes prevents lots of escaping characters.
|
|
7
|
-
singleQuote: false,
|
|
8
|
-
|
|
9
|
-
Keep very nested indentation near the left to prevent lots of horizontal scrolling.
|
|
10
|
-
tabWidth: 2,
|
|
11
|
-
|
|
12
|
-
Semicolons prevent AST errors and are more explicit where a line ends
|
|
13
|
-
semi: true,
|
|
14
|
-
|
|
15
|
-
Consistent line endings for MacOS and Windows
|
|
16
|
-
endOfLine: "lf",
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
// Tabs are better for visually impaired coders https://www.reddit.com/r/javascript/comments/c8drjo/nobody_talks_about_the_real_reason_to_use_tabs/
|
|
20
|
-
useTabs: true,
|
|
21
|
-
|
|
22
|
-
// Helps clean up git diffs by removing changes of a single comma on a line if adding a new line to the bottom
|
|
23
|
-
trailingComma: "all",
|
|
24
|
-
|
|
25
|
-
overrides: [
|
|
26
|
-
{
|
|
27
|
-
// yml files require specific indentation rules
|
|
28
|
-
files: ["*.yml", "*.yaml"],
|
|
29
|
-
options: {
|
|
30
|
-
useTabs: false,
|
|
31
|
-
tabWidth: 2,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
};
|
package/prettier/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./index.mjs";
|
package/prettier/index.mjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
/* Expected defaults:
|
|
3
|
-
Prettier recommendation
|
|
4
|
-
printWidth: 80,
|
|
5
|
-
|
|
6
|
-
Single quotes are more often found in text strings (used for apostrophes) so using double quotes prevents lots of escaping characters.
|
|
7
|
-
singleQuote: false,
|
|
8
|
-
|
|
9
|
-
Keep very nested indentation near the left to prevent lots of horizontal scrolling.
|
|
10
|
-
tabWidth: 2,
|
|
11
|
-
|
|
12
|
-
Semicolons prevent AST errors and are more explicit where a line ends
|
|
13
|
-
semi: true,
|
|
14
|
-
|
|
15
|
-
Consistent line endings for MacOS and Windows
|
|
16
|
-
endOfLine: "lf",
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
// Tabs are better for visually impaired coders https://www.reddit.com/r/javascript/comments/c8drjo/nobody_talks_about_the_real_reason_to_use_tabs/
|
|
20
|
-
useTabs: true,
|
|
21
|
-
|
|
22
|
-
// Helps clean up git diffs by removing changes of a single comma on a line if adding a new line to the bottom
|
|
23
|
-
trailingComma: "all",
|
|
24
|
-
|
|
25
|
-
overrides: [
|
|
26
|
-
{
|
|
27
|
-
// yml files require specific indentation rules
|
|
28
|
-
files: ["*.yml", "*.yaml"],
|
|
29
|
-
options: {
|
|
30
|
-
useTabs: false,
|
|
31
|
-
tabWidth: 2,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
};
|
package/stylelint/base.cjs
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
const commonRules = {
|
|
2
|
-
"custom-property-pattern": null,
|
|
3
|
-
"function-url-quotes": ["always"],
|
|
4
|
-
"rule-empty-line-before": [
|
|
5
|
-
"always",
|
|
6
|
-
{
|
|
7
|
-
except: ["first-nested"],
|
|
8
|
-
ignore: ["after-comment"],
|
|
9
|
-
},
|
|
10
|
-
],
|
|
11
|
-
"comment-empty-line-before": [
|
|
12
|
-
"always",
|
|
13
|
-
{
|
|
14
|
-
except: ["first-nested"],
|
|
15
|
-
ignore: ["stylelint-commands"],
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
"order/order": [
|
|
19
|
-
{
|
|
20
|
-
type: "at-rule",
|
|
21
|
-
hasBlock: false,
|
|
22
|
-
},
|
|
23
|
-
"custom-properties",
|
|
24
|
-
"dollar-variables",
|
|
25
|
-
"declarations",
|
|
26
|
-
{
|
|
27
|
-
type: "at-rule",
|
|
28
|
-
hasBlock: true,
|
|
29
|
-
},
|
|
30
|
-
"rules",
|
|
31
|
-
],
|
|
32
|
-
"plugin/no-restricted-syntax": [
|
|
33
|
-
[
|
|
34
|
-
{
|
|
35
|
-
selector:
|
|
36
|
-
"rule :matches(atrule[name=media], atrule[name=container]) rule",
|
|
37
|
-
message:
|
|
38
|
-
"Don't nest rules inside of media/container blocks. Instead, nest the rule and use the at rule within that.",
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
],
|
|
42
|
-
"selector-class-pattern": [
|
|
43
|
-
"^([a-z][a-z0-9]*)([_-]+[a-z0-9]+)*$",
|
|
44
|
-
{
|
|
45
|
-
message:
|
|
46
|
-
"Selector should use lowercase and separate words with hyphens or underscores (selector-class-pattern)",
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
"at-rule-empty-line-before": [
|
|
50
|
-
"always",
|
|
51
|
-
{
|
|
52
|
-
ignore: ["blockless-after-blockless", "first-nested", "after-comment"],
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
/** @type {import('stylelint').Config} */
|
|
58
|
-
module.exports = {
|
|
59
|
-
reportDescriptionlessDisables: true,
|
|
60
|
-
reportInvalidScopeDisables: true,
|
|
61
|
-
reportNeedlessDisables: true,
|
|
62
|
-
plugins: ["stylelint-order", "stylelint-no-restricted-syntax"],
|
|
63
|
-
rules: commonRules,
|
|
64
|
-
overrides: [
|
|
65
|
-
{
|
|
66
|
-
files: ["*.css", "**/*.css"],
|
|
67
|
-
extends: ["stylelint-config-standard", "@wordpress/stylelint-config"],
|
|
68
|
-
rules: {
|
|
69
|
-
"at-rule-no-unknown": [true, { ignoreAtRules: "context" }],
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
files: ["*.scss", "**/*.scss"],
|
|
74
|
-
extends: [
|
|
75
|
-
"stylelint-config-standard-scss",
|
|
76
|
-
"@wordpress/stylelint-config/scss",
|
|
77
|
-
],
|
|
78
|
-
rules: {
|
|
79
|
-
"scss/operator-no-newline-after": null,
|
|
80
|
-
"no-descending-specificity": null,
|
|
81
|
-
"scss/at-rule-no-unknown": [true, { ignoreAtRules: "context" }],
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
files: ["**/editor-style?(s).?(s)css"],
|
|
86
|
-
rules: {
|
|
87
|
-
"declaration-property-value-allowed-list": null,
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
};
|
package/stylelint/base.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./base.mjs";
|