@haltcase/style 7.0.0-canary.9 → 7.1.0-canary.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.
- package/dist/types/eslint/configs/browser.d.ts +8 -0
- package/dist/types/eslint/configs/cjs.d.ts +4 -0
- package/dist/types/eslint/configs/internal/base.d.ts +52 -0
- package/dist/types/eslint/configs/internal/commonjs.d.ts +4 -0
- package/dist/types/eslint/configs/internal/es2015.d.ts +4 -0
- package/dist/types/eslint/configs/internal/simple-import-sort.d.ts +4 -0
- package/dist/types/eslint/configs/internal/tsdoc.d.ts +4 -0
- package/dist/types/eslint/configs/internal/unicorn.d.ts +4 -0
- package/dist/types/eslint/configs/next.d.ts +8 -0
- package/dist/types/eslint/configs/node.d.ts +8 -0
- package/dist/types/eslint/configs/playwright-test.d.ts +4 -0
- package/dist/types/eslint/configs/react.d.ts +8 -0
- package/dist/types/eslint/configs/typescript.d.ts +4 -0
- package/dist/types/eslint/constants.d.ts +14 -0
- package/dist/types/eslint/index.d.ts +12 -0
- package/dist/types/eslint/rules/best-practice.d.ts +5 -0
- package/dist/types/eslint/rules/imports.d.ts +5 -0
- package/dist/types/eslint/rules/jsx-a11y.d.ts +5 -0
- package/dist/types/eslint/rules/playwright-test.d.ts +8 -0
- package/dist/types/eslint/rules/possible-errors.d.ts +8 -0
- package/dist/types/eslint/rules/react-x.d.ts +8 -0
- package/dist/types/eslint/rules/react.d.ts +11 -0
- package/dist/types/eslint/rules/stylistic-jsx.d.ts +8 -0
- package/dist/types/eslint/rules/stylistic.d.ts +8 -0
- package/dist/types/eslint/rules/typescript/extension.d.ts +5 -0
- package/dist/types/eslint/rules/typescript/import.d.ts +5 -0
- package/dist/types/eslint/rules/typescript/index.d.ts +8 -0
- package/dist/types/eslint/rules/typescript/naming-convention.d.ts +5 -0
- package/dist/types/eslint/rules/variables.d.ts +8 -0
- package/dist/types/eslint/withFiles.d.ts +2 -0
- package/dist/types/prettier/index.d.ts +12 -0
- package/dist/types/stylelint/_base.d.ts +1 -0
- package/dist/types/stylelint/index.d.ts +2 -0
- package/dist/types/stylelint/modules.d.ts +2 -0
- package/dist/types/stylelint/standard.d.ts +1 -0
- package/eslint/configs/next.js +2 -2
- package/eslint/configs/react.js +0 -1
- package/eslint/rules/typescript/naming-convention.js +1 -1
- package/package.json +65 -41
- package/prettier/index.js +19 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @type {import("./internal/base.js").HaltcaseStyleCreator}
|
|
3
|
+
*/
|
|
4
|
+
export const getEslintBrowserConfig: import("./internal/base.js").HaltcaseStyleCreator;
|
|
5
|
+
/**
|
|
6
|
+
* @type {import("./internal/base.js").HaltcaseStyleCreator}
|
|
7
|
+
*/
|
|
8
|
+
export const getEslintBrowserConfigInternal: import("./internal/base.js").HaltcaseStyleCreator;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} HaltcaseStyleOptions
|
|
3
|
+
* @property {boolean} [browser] Whether to include browser rules and globals.
|
|
4
|
+
* @property {boolean} [commonjs] Whether to treat *.js files as CommonJS instead of ES Modules.
|
|
5
|
+
* @property {boolean} [nextjs] Whether to include Next.js rules (implies `react`).
|
|
6
|
+
* @property {boolean} [node] Whether to include Node.js rules.
|
|
7
|
+
* @property {boolean} [react] Whether to include React rules.
|
|
8
|
+
* @property {ParserOptions["project"]} [typescriptProject = true] Custom TypeScript project options for the `typescript-eslint` parser.
|
|
9
|
+
* // use when VS Code supports `projectService`
|
|
10
|
+
* // https://github.com/microsoft/vscode-eslint/issues/1911
|
|
11
|
+
* property {ProjectServiceOptions} [typescriptProjectServiceOptions = true] Custom TypeScript project service options for the `typescript-eslint` parser.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* @typedef {(options?: HaltcaseStyleOptions) => Awaited<import("typescript-eslint").Config>} HaltcaseStyleCreator
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Get the common ESLint config for Node and browsers.
|
|
18
|
+
*
|
|
19
|
+
* @type {HaltcaseStyleCreator}
|
|
20
|
+
*/
|
|
21
|
+
export const getEslintBaseConfig: HaltcaseStyleCreator;
|
|
22
|
+
export type HaltcaseStyleOptions = {
|
|
23
|
+
/**
|
|
24
|
+
* Whether to include browser rules and globals.
|
|
25
|
+
*/
|
|
26
|
+
browser?: boolean | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to treat *.js files as CommonJS instead of ES Modules.
|
|
29
|
+
*/
|
|
30
|
+
commonjs?: boolean | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Whether to include Next.js rules (implies `react`).
|
|
33
|
+
*/
|
|
34
|
+
nextjs?: boolean | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to include Node.js rules.
|
|
37
|
+
*/
|
|
38
|
+
node?: boolean | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to include React rules.
|
|
41
|
+
*/
|
|
42
|
+
react?: boolean | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Custom TypeScript project options for the `typescript-eslint` parser.
|
|
45
|
+
* // use when VS Code supports `projectService`
|
|
46
|
+
* // https://github.com/microsoft/vscode-eslint/issues/1911
|
|
47
|
+
* property {ProjectServiceOptions} [typescriptProjectServiceOptions = true] Custom TypeScript project service options for the `typescript-eslint` parser.
|
|
48
|
+
*/
|
|
49
|
+
typescriptProject?: ParserOptions["project"];
|
|
50
|
+
};
|
|
51
|
+
export type HaltcaseStyleCreator = (options?: HaltcaseStyleOptions) => Awaited<import("typescript-eslint").Config>;
|
|
52
|
+
import type { ParserOptions } from "@typescript-eslint/types";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @type {import("./internal/base.js").HaltcaseStyleCreator}
|
|
3
|
+
*/
|
|
4
|
+
export const getEslintNextConfig: import("./internal/base.js").HaltcaseStyleCreator;
|
|
5
|
+
/**
|
|
6
|
+
* @type {import("./internal/base.js").HaltcaseStyleCreator}
|
|
7
|
+
*/
|
|
8
|
+
export const getEslintNextConfigInternal: import("./internal/base.js").HaltcaseStyleCreator;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @type {import("./internal/base.js").HaltcaseStyleCreator}
|
|
3
|
+
*/
|
|
4
|
+
export const getEslintNodeConfig: import("./internal/base.js").HaltcaseStyleCreator;
|
|
5
|
+
/**
|
|
6
|
+
* @type {import("./internal/base.js").HaltcaseStyleCreator}
|
|
7
|
+
*/
|
|
8
|
+
export const getEslintNodeConfigInternal: import("./internal/base.js").HaltcaseStyleCreator;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @type {import("./internal/base.js").HaltcaseStyleCreator}
|
|
3
|
+
*/
|
|
4
|
+
export const getEslintReactConfig: import("./internal/base.js").HaltcaseStyleCreator;
|
|
5
|
+
/**
|
|
6
|
+
* @type {import("./internal/base.js").HaltcaseStyleCreator}
|
|
7
|
+
*/
|
|
8
|
+
export const getEslintReactConfigInternal: import("./internal/base.js").HaltcaseStyleCreator;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const ecmaVersion: 2021;
|
|
2
|
+
export const commonJsOnlyFiles: string[];
|
|
3
|
+
export const commonJsFiles: string[];
|
|
4
|
+
export const javascriptFiles: string[];
|
|
5
|
+
export const typescriptFiles: string[];
|
|
6
|
+
export const javascriptJsxFiles: string[];
|
|
7
|
+
export const typescriptJsxFiles: string[];
|
|
8
|
+
export const jsxFiles: string[];
|
|
9
|
+
export const configFiles: string[];
|
|
10
|
+
export const scriptFiles: string[];
|
|
11
|
+
export const nextJsPageFiles: string[];
|
|
12
|
+
export const nextJsApiRoutes: string[];
|
|
13
|
+
export const nextJsMetadataFiles: string[];
|
|
14
|
+
export const allSupportedFiles: string[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @type {import("./configs/internal/base.js").HaltcaseStyleCreator}
|
|
3
|
+
*/
|
|
4
|
+
export const getEslintConfig: import("./configs/internal/base.js").HaltcaseStyleCreator;
|
|
5
|
+
export default getEslintConfig;
|
|
6
|
+
export { getEslintBrowserConfig } from "./configs/browser.js";
|
|
7
|
+
export { getEslintCommonJsConfig } from "./configs/cjs.js";
|
|
8
|
+
export { getEslintNextConfig } from "./configs/next.js";
|
|
9
|
+
export { getEslintNodeConfig } from "./configs/node.js";
|
|
10
|
+
export { getEslintReactConfig } from "./configs/react.js";
|
|
11
|
+
export { getEslintTypescriptConfig } from "./configs/typescript.js";
|
|
12
|
+
export { withFiles } from "./withFiles.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import { Linter } from "eslint"
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* We primarily use `@eslint-react/eslint-plugin`, but it's not quite complete
|
|
6
|
+
* compared to the official plugin. We enable missing rules selectively here.
|
|
7
|
+
*
|
|
8
|
+
* @type {Linter.RulesRecord}
|
|
9
|
+
*/
|
|
10
|
+
export const reactRules: Linter.RulesRecord;
|
|
11
|
+
import type { Linter } from "eslint";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let singleQuote: boolean;
|
|
3
|
+
let trailingComma: string;
|
|
4
|
+
let plugins: string[];
|
|
5
|
+
let tailwindAttributes: string[];
|
|
6
|
+
let tailwindFunctions: string[];
|
|
7
|
+
let endOfLine: "lf";
|
|
8
|
+
let printWidth: number;
|
|
9
|
+
let tabWidth: number;
|
|
10
|
+
let useTabs: true;
|
|
11
|
+
}
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const stylelintBase: import("stylelint-define-config").StylelintConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { stylelintBase as default } from "./_base.js";
|
package/eslint/configs/next.js
CHANGED
|
@@ -2,7 +2,7 @@ import pluginNextjs from "@next/eslint-plugin-next";
|
|
|
2
2
|
import { config } from "typescript-eslint";
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
allSupportedFiles,
|
|
6
6
|
nextJsApiRoutes,
|
|
7
7
|
nextJsMetadataFiles,
|
|
8
8
|
nextJsPageFiles
|
|
@@ -30,7 +30,7 @@ export const getEslintNextConfigInternal = (options = {}) =>
|
|
|
30
30
|
{
|
|
31
31
|
name: "@haltcase/nextjs",
|
|
32
32
|
|
|
33
|
-
files:
|
|
33
|
+
files: allSupportedFiles,
|
|
34
34
|
plugins: {
|
|
35
35
|
"@next/next": pluginNextjs
|
|
36
36
|
},
|
package/eslint/configs/react.js
CHANGED
|
@@ -36,7 +36,6 @@ export const getEslintReactConfigInternal = (_options = {}) =>
|
|
|
36
36
|
{
|
|
37
37
|
name: "@haltcase/react/jsx-eslint/react",
|
|
38
38
|
plugins: {
|
|
39
|
-
// @ts-expect-error see https://github.com/jsx-eslint/eslint-plugin-react/pull/3840
|
|
40
39
|
react: eslintPluginReactOriginal
|
|
41
40
|
},
|
|
42
41
|
rules: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haltcase/style",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.0-canary.1",
|
|
4
4
|
"description": "haltcase's web ecosystem style guide & configurations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -19,13 +19,34 @@
|
|
|
19
19
|
"author": "Bo Lingen <bo@haltcase.dev> (https://haltcase.dev)",
|
|
20
20
|
"type": "module",
|
|
21
21
|
"exports": {
|
|
22
|
-
"./eslint":
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"./
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
"./eslint": {
|
|
23
|
+
"types": "./dist/types/eslint/index.d.ts",
|
|
24
|
+
"default": "./eslint/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./eslint/rules/*": {
|
|
27
|
+
"types": "./dist/types/eslint/rules/*.d.ts",
|
|
28
|
+
"default": "./eslint/rules/*.js"
|
|
29
|
+
},
|
|
30
|
+
"./eslint/rules/typescript": {
|
|
31
|
+
"types": "./dist/types/eslint/rules/typescript/index.d.ts",
|
|
32
|
+
"default": "./eslint/rules/typescript/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./prettier": {
|
|
35
|
+
"types": "./dist/types/prettier/index.d.ts",
|
|
36
|
+
"default": "./prettier/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./stylelint": {
|
|
39
|
+
"types": "./dist/types/stylelint/index.d.ts",
|
|
40
|
+
"default": "./stylelint/index.js"
|
|
41
|
+
},
|
|
42
|
+
"./stylelint/modules": {
|
|
43
|
+
"types": "./dist/types/stylelint/modules.d.ts",
|
|
44
|
+
"default": "./stylelint/modules.js"
|
|
45
|
+
},
|
|
46
|
+
"./stylelint/standard": {
|
|
47
|
+
"types": "./dist/types/stylelint/standard.d.ts",
|
|
48
|
+
"default": "./stylelint/standard.js"
|
|
49
|
+
},
|
|
29
50
|
"./typescript/base": "./typescript/tsconfig.base.json",
|
|
30
51
|
"./typescript/bundler": "./typescript/tsconfig.bundler.json",
|
|
31
52
|
"./typescript/next": "./typescript/tsconfig.next.json",
|
|
@@ -36,6 +57,7 @@
|
|
|
36
57
|
"./typescript/web": "./typescript/tsconfig.web.json"
|
|
37
58
|
},
|
|
38
59
|
"files": [
|
|
60
|
+
"dist",
|
|
39
61
|
"eslint",
|
|
40
62
|
"prettier",
|
|
41
63
|
"stylelint",
|
|
@@ -46,6 +68,7 @@
|
|
|
46
68
|
"eslint-check": "eslint --max-warnings=0 .",
|
|
47
69
|
"format": "eslint --fix . && prettier --write .",
|
|
48
70
|
"prepare": "husky",
|
|
71
|
+
"prepublishOnly": "tsc",
|
|
49
72
|
"prettier-check": "prettier --check .",
|
|
50
73
|
"semantic-release": "semantic-release",
|
|
51
74
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -58,57 +81,57 @@
|
|
|
58
81
|
"extends": "./stylelint/index.js"
|
|
59
82
|
},
|
|
60
83
|
"dependencies": {
|
|
61
|
-
"@babel/core": "^7.26.
|
|
62
|
-
"@babel/eslint-parser": "^7.
|
|
84
|
+
"@babel/core": "^7.26.9",
|
|
85
|
+
"@babel/eslint-parser": "^7.26.8",
|
|
63
86
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
64
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
65
|
-
"@next/eslint-plugin-next": "^15.
|
|
66
|
-
"@stylistic/eslint-plugin-jsx": "^
|
|
67
|
-
"eslint-config-prettier": "^
|
|
87
|
+
"@eslint-react/eslint-plugin": "^1.26.2",
|
|
88
|
+
"@next/eslint-plugin-next": "^15.1.7",
|
|
89
|
+
"@stylistic/eslint-plugin-jsx": "^3.1.0",
|
|
90
|
+
"eslint-config-prettier": "^10.0.1",
|
|
68
91
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
69
|
-
"eslint-import-resolver-typescript": "^3.
|
|
70
|
-
"eslint-plugin-import-x": "^4.
|
|
92
|
+
"eslint-import-resolver-typescript": "^3.8.0",
|
|
93
|
+
"eslint-plugin-import-x": "^4.6.1",
|
|
71
94
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
72
|
-
"eslint-plugin-playwright": "^2.
|
|
73
|
-
"eslint-plugin-react": "^7.37.
|
|
74
|
-
"eslint-plugin-react-hooks": "^5.
|
|
95
|
+
"eslint-plugin-playwright": "^2.2.0",
|
|
96
|
+
"eslint-plugin-react": "^7.37.4",
|
|
97
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
75
98
|
"eslint-plugin-regexp": "^2.7.0",
|
|
76
99
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
77
|
-
"eslint-plugin-testing-library": "^
|
|
100
|
+
"eslint-plugin-testing-library": "^7.1.1",
|
|
78
101
|
"eslint-plugin-tsdoc": "^0.4.0",
|
|
79
102
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
80
|
-
"postcss-html": "^1.
|
|
81
|
-
"prettier-plugin-packagejson": "^2.5.
|
|
82
|
-
"prettier-plugin-tailwindcss": "^0.6.
|
|
83
|
-
"stylelint-config-clean-order": "^
|
|
103
|
+
"postcss-html": "^1.8.0",
|
|
104
|
+
"prettier-plugin-packagejson": "^2.5.8",
|
|
105
|
+
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
106
|
+
"stylelint-config-clean-order": "^7.0.0",
|
|
84
107
|
"stylelint-config-html": "^1.1.0",
|
|
85
|
-
"stylelint-config-standard": "^
|
|
86
|
-
"stylelint-define-config": "^
|
|
87
|
-
"typescript-eslint": "^8.
|
|
108
|
+
"stylelint-config-standard": "^37.0.0",
|
|
109
|
+
"stylelint-define-config": "^16.14.1",
|
|
110
|
+
"typescript-eslint": "^8.24.0"
|
|
88
111
|
},
|
|
89
112
|
"devDependencies": {
|
|
90
113
|
"@actions/core": "^1.11.1",
|
|
91
114
|
"@actions/exec": "^1.1.1",
|
|
92
115
|
"@actions/github": "^6.0.0",
|
|
93
|
-
"@commitlint/cli": "^19.
|
|
94
|
-
"@commitlint/config-conventional": "^19.
|
|
116
|
+
"@commitlint/cli": "^19.7.1",
|
|
117
|
+
"@commitlint/config-conventional": "^19.7.1",
|
|
95
118
|
"@eslint/eslintrc": "^3.2.0",
|
|
96
|
-
"@eslint/js": "^9.
|
|
97
|
-
"@octokit/types": "^13.
|
|
119
|
+
"@eslint/js": "^9.20.0",
|
|
120
|
+
"@octokit/types": "^13.8.0",
|
|
98
121
|
"@semantic-release/git": "^10.0.1",
|
|
99
122
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
100
123
|
"@types/eslint__js": "^8.42.3",
|
|
101
124
|
"@types/node": "22",
|
|
102
|
-
"@typescript-eslint/types": "^8.
|
|
103
|
-
"eslint": "^9.
|
|
125
|
+
"@typescript-eslint/types": "^8.24.0",
|
|
126
|
+
"eslint": "^9.20.1",
|
|
104
127
|
"eslint-define-config": "^2.1.0",
|
|
105
|
-
"globals": "^15.
|
|
128
|
+
"globals": "^15.15.0",
|
|
106
129
|
"husky": "^9.1.7",
|
|
107
|
-
"lint-staged": "^15.
|
|
108
|
-
"prettier": "^3.
|
|
109
|
-
"semantic-release": "^24.2.
|
|
110
|
-
"stylelint": "^16.
|
|
111
|
-
"typescript": "^5.7.
|
|
130
|
+
"lint-staged": "^15.4.3",
|
|
131
|
+
"prettier": "^3.5.1",
|
|
132
|
+
"semantic-release": "^24.2.3",
|
|
133
|
+
"stylelint": "^16.14.1",
|
|
134
|
+
"typescript": "^5.7.3"
|
|
112
135
|
},
|
|
113
136
|
"peerDependencies": {
|
|
114
137
|
"eslint": ">=9",
|
|
@@ -130,9 +153,10 @@
|
|
|
130
153
|
"optional": true
|
|
131
154
|
}
|
|
132
155
|
},
|
|
133
|
-
"packageManager": "pnpm@
|
|
156
|
+
"packageManager": "pnpm@10.4.1",
|
|
134
157
|
"engines": {
|
|
135
|
-
"node": ">=20"
|
|
158
|
+
"node": ">=20",
|
|
159
|
+
"pnpm": ">=10"
|
|
136
160
|
},
|
|
137
161
|
"publishConfig": {
|
|
138
162
|
"access": "public"
|
package/prettier/index.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/* eslint-disable import-x/no-default-export */
|
|
2
2
|
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* Some of Prettier's defaults can be overridden by an EditorConfig file. We
|
|
5
7
|
* define those here to ensure that doesn't happen.
|
|
6
8
|
*
|
|
7
9
|
* See: https://prettier.io/docs/en/configuration#editorconfig
|
|
10
|
+
*
|
|
11
|
+
* @satisfies {import("prettier").Options}
|
|
8
12
|
*/
|
|
9
13
|
const overridableDefaults = {
|
|
10
14
|
endOfLine: "lf",
|
|
@@ -13,10 +17,23 @@ const overridableDefaults = {
|
|
|
13
17
|
useTabs: true
|
|
14
18
|
};
|
|
15
19
|
|
|
20
|
+
/**
|
|
21
|
+
* @param {string} specifier - The plugin's package name.
|
|
22
|
+
*/
|
|
23
|
+
const resolvePlugin = (specifier) =>
|
|
24
|
+
fileURLToPath(import.meta.resolve(specifier));
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @satisfies {import("prettier").Options}
|
|
28
|
+
*/
|
|
16
29
|
export default {
|
|
17
30
|
...overridableDefaults,
|
|
18
31
|
singleQuote: false,
|
|
19
32
|
trailingComma: "none",
|
|
20
|
-
plugins: [
|
|
21
|
-
|
|
33
|
+
plugins: [
|
|
34
|
+
resolvePlugin("prettier-plugin-packagejson"),
|
|
35
|
+
resolvePlugin("prettier-plugin-tailwindcss")
|
|
36
|
+
],
|
|
37
|
+
tailwindAttributes: ["classNames"],
|
|
38
|
+
tailwindFunctions: ["clsx", "cn", "cx", "twMerge"]
|
|
22
39
|
};
|