@lzear/eslint-config 3.0.1 → 4.0.2

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/package.json CHANGED
@@ -1,63 +1,77 @@
1
1
  {
2
2
  "name": "@lzear/eslint-config",
3
- "version": "3.0.1",
4
- "description": "ESLint shareable config",
5
- "keywords": [
6
- "eslint",
7
- "eslint-config",
8
- "config",
9
- "code-styles",
10
- "linter",
11
- "javascript",
12
- "typescript"
13
- ],
3
+ "version": "4.0.2",
4
+ "description": "Shared ESLint flat config for lzear repos",
14
5
  "repository": {
15
6
  "type": "git",
16
- "url": "git+https://github.com/lzear/eslint-config.git"
7
+ "url": "git+https://github.com/lzear/forge.git",
8
+ "directory": "packages/eslint-config"
17
9
  },
18
- "license": "MIT",
19
10
  "author": "lzear",
11
+ "license": "MIT",
12
+ "sideEffects": false,
20
13
  "type": "module",
21
14
  "exports": {
22
15
  ".": {
23
16
  "types": "./dist/index.d.ts",
24
- "import": "./dist/index.mjs",
25
- "require": "./dist/index.cjs"
26
- },
27
- "./package.json": "./package.json"
17
+ "default": "./dist/index.js"
18
+ }
28
19
  },
29
20
  "files": [
30
- "./dist"
21
+ "dist"
31
22
  ],
23
+ "scripts": {
24
+ "build": "tsup",
25
+ "dev": "tsup --watch",
26
+ "test": "vitest run",
27
+ "typecheck": "tsc --noEmit"
28
+ },
32
29
  "dependencies": {
33
- "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
34
- "@eslint/js": "^9.20.0",
35
- "@next/eslint-plugin-next": "^15.1.7",
36
- "@vitest/eslint-plugin": "^1.1.31",
37
- "eslint-import-resolver-typescript": "^3.8.0",
38
- "eslint-plugin-de-morgan": "^1.0.1",
39
- "eslint-plugin-import-x": "^4.6.1",
40
- "eslint-plugin-jsx-a11y": "^6.10.2",
41
- "eslint-plugin-n": "^17.15.1",
42
- "eslint-plugin-package-json": "^0.26.0",
43
- "eslint-plugin-perfectionist": "^4.9.0",
44
- "eslint-plugin-prefer-arrow": "^1.2.3",
45
- "eslint-plugin-promise": "^7.2.1",
46
- "eslint-plugin-react": "^7.37.4",
47
- "eslint-plugin-react-compiler": "19.0.0-beta-e552027-20250112",
48
- "eslint-plugin-react-hooks": "^5.1.0",
49
- "eslint-plugin-react-perf": "^3.3.3",
50
- "eslint-plugin-regexp": "^2.7.0",
51
- "eslint-plugin-sonarjs": "^3.0.2",
52
- "eslint-plugin-unicorn": "^56.0.1",
53
- "globals": "^15.15.0",
54
- "jsonc-eslint-parser": "^2.4.0",
55
- "typescript-eslint": "^8.24.0"
30
+ "@eslint-community/eslint-plugin-eslint-comments": "^4",
31
+ "@eslint/js": "^9",
32
+ "@next/eslint-plugin-next": "^16",
33
+ "@vitest/eslint-plugin": "^1",
34
+ "eslint-config-prettier": "^10",
35
+ "eslint-import-resolver-typescript": "^4",
36
+ "eslint-module-utils": "^2",
37
+ "eslint-plugin-de-morgan": "^2",
38
+ "eslint-plugin-import-x": "^4",
39
+ "eslint-plugin-jsx-a11y": "^6",
40
+ "eslint-plugin-n": "^17",
41
+ "eslint-plugin-package-json": "^0.91",
42
+ "eslint-plugin-prefer-arrow": "^1",
43
+ "eslint-plugin-prettier": "^5",
44
+ "eslint-plugin-promise": "^7",
45
+ "eslint-plugin-react": "^7",
46
+ "eslint-plugin-react-compiler": "^19.1.0-rc.2",
47
+ "eslint-plugin-react-dom": "^5",
48
+ "eslint-plugin-react-hooks": "^7",
49
+ "eslint-plugin-react-perf": "^3",
50
+ "eslint-plugin-react-web-api": "^5",
51
+ "eslint-plugin-react-x": "^5",
52
+ "eslint-plugin-regexp": "^3",
53
+ "eslint-plugin-sonarjs": "^4",
54
+ "eslint-plugin-unicorn": "^64",
55
+ "globals": "^17",
56
+ "jsonc-eslint-parser": "^3",
57
+ "prettier": "^3",
58
+ "typescript-eslint": "^8"
59
+ },
60
+ "devDependencies": {
61
+ "@lzear/configs": "4.0.2",
62
+ "@vitest/coverage-v8": "^4",
63
+ "eslint": "^9",
64
+ "tsup": "^8",
65
+ "typescript": "^6",
66
+ "vitest": "^4"
56
67
  },
57
68
  "peerDependencies": {
58
- "eslint": ">=9.14.0"
69
+ "eslint": "^9"
70
+ },
71
+ "engines": {
72
+ "node": ">=20"
59
73
  },
60
74
  "publishConfig": {
61
75
  "access": "public"
62
76
  }
63
- }
77
+ }
@@ -1,54 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxA11y = require("eslint-plugin-jsx-a11y");
4
- const a11y = (config) => {
5
- if (!config.react) {
6
- return {};
7
- }
8
- const files = ["**/*.jsx"];
9
- if (config.typescript) {
10
- files.push("**/*.tsx");
11
- }
12
- return {
13
- name: "lzear/a11y",
14
- files,
15
- plugins: {
16
- "jsx-a11y": jsxA11y
17
- },
18
- rules: {
19
- "jsx-a11y/alt-text": "error",
20
- "jsx-a11y/anchor-has-content": "error",
21
- "jsx-a11y/anchor-is-valid": "error",
22
- "jsx-a11y/aria-activedescendant-has-tabindex": "error",
23
- "jsx-a11y/aria-props": "error",
24
- "jsx-a11y/aria-proptypes": "error",
25
- "jsx-a11y/aria-role": "error",
26
- "jsx-a11y/aria-unsupported-elements": "error",
27
- "jsx-a11y/autocomplete-valid": "error",
28
- "jsx-a11y/heading-has-content": "error",
29
- "jsx-a11y/html-has-lang": "error",
30
- "jsx-a11y/iframe-has-title": "error",
31
- "jsx-a11y/img-redundant-alt": "error",
32
- "jsx-a11y/interactive-supports-focus": "error",
33
- "jsx-a11y/label-has-associated-control": "error",
34
- "jsx-a11y/lang": "error",
35
- "jsx-a11y/media-has-caption": "error",
36
- "jsx-a11y/mouse-events-have-key-events": "error",
37
- "jsx-a11y/no-access-key": "error",
38
- "jsx-a11y/no-aria-hidden-on-focusable": "error",
39
- "jsx-a11y/no-autofocus": "error",
40
- "jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
41
- "jsx-a11y/no-noninteractive-element-interactions": "error",
42
- "jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
43
- "jsx-a11y/no-noninteractive-tabindex": "error",
44
- "jsx-a11y/no-redundant-roles": "error",
45
- "jsx-a11y/no-static-element-interactions": "error",
46
- "jsx-a11y/prefer-tag-over-role": "error",
47
- "jsx-a11y/role-has-required-aria-props": "error",
48
- "jsx-a11y/role-supports-aria-props": "error",
49
- "jsx-a11y/scope": "error",
50
- "jsx-a11y/tabindex-no-positive": "error"
51
- }
52
- };
53
- };
54
- exports.a11y = a11y;
@@ -1,54 +0,0 @@
1
- import jsxA11y from "eslint-plugin-jsx-a11y";
2
- const a11y = (config) => {
3
- if (!config.react) {
4
- return {};
5
- }
6
- const files = ["**/*.jsx"];
7
- if (config.typescript) {
8
- files.push("**/*.tsx");
9
- }
10
- return {
11
- name: "lzear/a11y",
12
- files,
13
- plugins: {
14
- "jsx-a11y": jsxA11y
15
- },
16
- rules: {
17
- "jsx-a11y/alt-text": "error",
18
- "jsx-a11y/anchor-has-content": "error",
19
- "jsx-a11y/anchor-is-valid": "error",
20
- "jsx-a11y/aria-activedescendant-has-tabindex": "error",
21
- "jsx-a11y/aria-props": "error",
22
- "jsx-a11y/aria-proptypes": "error",
23
- "jsx-a11y/aria-role": "error",
24
- "jsx-a11y/aria-unsupported-elements": "error",
25
- "jsx-a11y/autocomplete-valid": "error",
26
- "jsx-a11y/heading-has-content": "error",
27
- "jsx-a11y/html-has-lang": "error",
28
- "jsx-a11y/iframe-has-title": "error",
29
- "jsx-a11y/img-redundant-alt": "error",
30
- "jsx-a11y/interactive-supports-focus": "error",
31
- "jsx-a11y/label-has-associated-control": "error",
32
- "jsx-a11y/lang": "error",
33
- "jsx-a11y/media-has-caption": "error",
34
- "jsx-a11y/mouse-events-have-key-events": "error",
35
- "jsx-a11y/no-access-key": "error",
36
- "jsx-a11y/no-aria-hidden-on-focusable": "error",
37
- "jsx-a11y/no-autofocus": "error",
38
- "jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
39
- "jsx-a11y/no-noninteractive-element-interactions": "error",
40
- "jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
41
- "jsx-a11y/no-noninteractive-tabindex": "error",
42
- "jsx-a11y/no-redundant-roles": "error",
43
- "jsx-a11y/no-static-element-interactions": "error",
44
- "jsx-a11y/prefer-tag-over-role": "error",
45
- "jsx-a11y/role-has-required-aria-props": "error",
46
- "jsx-a11y/role-supports-aria-props": "error",
47
- "jsx-a11y/scope": "error",
48
- "jsx-a11y/tabindex-no-positive": "error"
49
- }
50
- };
51
- };
52
- export {
53
- a11y
54
- };
@@ -1,88 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const js = require("@eslint/js");
4
- const eslintCommentsPlugin = require("@eslint-community/eslint-plugin-eslint-comments");
5
- const deMorganPlugin = require("eslint-plugin-de-morgan");
6
- const importXPlugin = require("eslint-plugin-import-x");
7
- const preferArrowPlugin = require("eslint-plugin-prefer-arrow");
8
- const promisePlugin = require("eslint-plugin-promise");
9
- const regexpPlugin = require("eslint-plugin-regexp");
10
- const sonarjsPlugin = require("eslint-plugin-sonarjs");
11
- const unicornPlugin = require("eslint-plugin-unicorn");
12
- const globals = require("globals");
13
- const core = () => {
14
- const files = [
15
- "**/*.js",
16
- "**/*.cjs",
17
- "**/*.mjs",
18
- "**/*.ts",
19
- "**/*.cts",
20
- "**/*.mts",
21
- "**/*.jsx",
22
- "**/*.tsx"
23
- ];
24
- const rules = {
25
- ...js.configs.recommended.rules,
26
- ...eslintCommentsPlugin.configs.recommended.rules,
27
- "@eslint-community/eslint-comments/disable-enable-pair": 0,
28
- "@eslint-community/eslint-comments/no-unlimited-disable": 0,
29
- ...deMorganPlugin.configs.recommended.rules,
30
- ...importXPlugin.configs.recommended.rules,
31
- "import-x/no-unresolved": 0,
32
- "import-x/order": [
33
- 2,
34
- {
35
- alphabetize: { order: "asc", orderImportKind: "asc" },
36
- "newlines-between": "never"
37
- }
38
- ],
39
- "prefer-arrow/prefer-arrow-functions": [
40
- 2,
41
- {
42
- classPropertiesAllowed: false,
43
- disallowPrototype: true,
44
- singleReturnOnly: false
45
- }
46
- ],
47
- ...promisePlugin.configs.recommended.rules,
48
- ...regexpPlugin.configs.recommended.rules,
49
- ...sonarjsPlugin.configs.recommended.rules,
50
- "sonarjs/fixme-tag": 0,
51
- "sonarjs/pseudo-random": 0,
52
- "sonarjs/todo-tag": 0,
53
- "sonarjs/void-use": 0,
54
- ...unicornPlugin.configs.recommended.rules,
55
- "unicorn/no-abusive-eslint-disable": 0,
56
- "unicorn/no-nested-ternary": 0,
57
- "unicorn/no-null": 0,
58
- "unicorn/number-literal-case": 0,
59
- "unicorn/prevent-abbreviations": 0
60
- };
61
- return {
62
- name: "lzear/core",
63
- files,
64
- languageOptions: {
65
- globals: {
66
- ...globals.browser,
67
- ...globals.es2025,
68
- ...globals.node
69
- },
70
- parserOptions: {
71
- ecmaVersion: "latest",
72
- sourceType: "module"
73
- }
74
- },
75
- plugins: {
76
- "@eslint-community/eslint-comments": eslintCommentsPlugin,
77
- "de-morgan": deMorganPlugin,
78
- "import-x": importXPlugin,
79
- "prefer-arrow": preferArrowPlugin,
80
- promise: promisePlugin,
81
- regexp: regexpPlugin,
82
- sonarjs: sonarjsPlugin,
83
- unicorn: unicornPlugin
84
- },
85
- rules
86
- };
87
- };
88
- exports.core = core;
@@ -1,88 +0,0 @@
1
- import js from "@eslint/js";
2
- import eslintCommentsPlugin from "@eslint-community/eslint-plugin-eslint-comments";
3
- import deMorganPlugin from "eslint-plugin-de-morgan";
4
- import importXPlugin from "eslint-plugin-import-x";
5
- import preferArrowPlugin from "eslint-plugin-prefer-arrow";
6
- import promisePlugin from "eslint-plugin-promise";
7
- import regexpPlugin from "eslint-plugin-regexp";
8
- import sonarjsPlugin from "eslint-plugin-sonarjs";
9
- import unicornPlugin from "eslint-plugin-unicorn";
10
- import globals from "globals";
11
- const core = () => {
12
- const files = [
13
- "**/*.js",
14
- "**/*.cjs",
15
- "**/*.mjs",
16
- "**/*.ts",
17
- "**/*.cts",
18
- "**/*.mts",
19
- "**/*.jsx",
20
- "**/*.tsx"
21
- ];
22
- const rules = {
23
- ...js.configs.recommended.rules,
24
- ...eslintCommentsPlugin.configs.recommended.rules,
25
- "@eslint-community/eslint-comments/disable-enable-pair": 0,
26
- "@eslint-community/eslint-comments/no-unlimited-disable": 0,
27
- ...deMorganPlugin.configs.recommended.rules,
28
- ...importXPlugin.configs.recommended.rules,
29
- "import-x/no-unresolved": 0,
30
- "import-x/order": [
31
- 2,
32
- {
33
- alphabetize: { order: "asc", orderImportKind: "asc" },
34
- "newlines-between": "never"
35
- }
36
- ],
37
- "prefer-arrow/prefer-arrow-functions": [
38
- 2,
39
- {
40
- classPropertiesAllowed: false,
41
- disallowPrototype: true,
42
- singleReturnOnly: false
43
- }
44
- ],
45
- ...promisePlugin.configs.recommended.rules,
46
- ...regexpPlugin.configs.recommended.rules,
47
- ...sonarjsPlugin.configs.recommended.rules,
48
- "sonarjs/fixme-tag": 0,
49
- "sonarjs/pseudo-random": 0,
50
- "sonarjs/todo-tag": 0,
51
- "sonarjs/void-use": 0,
52
- ...unicornPlugin.configs.recommended.rules,
53
- "unicorn/no-abusive-eslint-disable": 0,
54
- "unicorn/no-nested-ternary": 0,
55
- "unicorn/no-null": 0,
56
- "unicorn/number-literal-case": 0,
57
- "unicorn/prevent-abbreviations": 0
58
- };
59
- return {
60
- name: "lzear/core",
61
- files,
62
- languageOptions: {
63
- globals: {
64
- ...globals.browser,
65
- ...globals.es2025,
66
- ...globals.node
67
- },
68
- parserOptions: {
69
- ecmaVersion: "latest",
70
- sourceType: "module"
71
- }
72
- },
73
- plugins: {
74
- "@eslint-community/eslint-comments": eslintCommentsPlugin,
75
- "de-morgan": deMorganPlugin,
76
- "import-x": importXPlugin,
77
- "prefer-arrow": preferArrowPlugin,
78
- promise: promisePlugin,
79
- regexp: regexpPlugin,
80
- sonarjs: sonarjsPlugin,
81
- unicorn: unicornPlugin
82
- },
83
- rules
84
- };
85
- };
86
- export {
87
- core
88
- };
@@ -1,49 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") {
10
- for (let key of __getOwnPropNames(from))
11
- if (!__hasOwnProp.call(to, key) && key !== except)
12
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- }
14
- return to;
15
- };
16
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
18
- mod
19
- ));
20
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
21
- const utils = require("../../utils.cjs");
22
- const node = async (config) => {
23
- if (!config.node) {
24
- return {};
25
- }
26
- const nodePlugin = await utils.interopDefault(import("eslint-plugin-n"));
27
- const files = ["**/*.js", "**/*.cjs", "**/*.mjs"];
28
- if (config.typescript) {
29
- files.push("**/*.ts", "**/*.cts", "**/*.mts");
30
- }
31
- if (config.react) {
32
- files.push("**/*.jsx");
33
- if (config.typescript) {
34
- files.push("**/*.tsx");
35
- }
36
- }
37
- return {
38
- name: "lzear/node",
39
- files,
40
- plugins: {
41
- n: nodePlugin
42
- },
43
- rules: {
44
- ...nodePlugin.configs["recommended-module"].rules,
45
- "n/no-missing-import": 0
46
- }
47
- };
48
- };
49
- exports.node = node;
@@ -1,31 +0,0 @@
1
- import { interopDefault } from "../../utils.mjs";
2
- const node = async (config) => {
3
- if (!config.node) {
4
- return {};
5
- }
6
- const nodePlugin = await interopDefault(import("eslint-plugin-n"));
7
- const files = ["**/*.js", "**/*.cjs", "**/*.mjs"];
8
- if (config.typescript) {
9
- files.push("**/*.ts", "**/*.cts", "**/*.mts");
10
- }
11
- if (config.react) {
12
- files.push("**/*.jsx");
13
- if (config.typescript) {
14
- files.push("**/*.tsx");
15
- }
16
- }
17
- return {
18
- name: "lzear/node",
19
- files,
20
- plugins: {
21
- n: nodePlugin
22
- },
23
- rules: {
24
- ...nodePlugin.configs["recommended-module"].rules,
25
- "n/no-missing-import": 0
26
- }
27
- };
28
- };
29
- export {
30
- node
31
- };
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const packageJsonPlugin = require("eslint-plugin-package-json");
4
- const jsoncParser = require("jsonc-eslint-parser");
5
- function _interopNamespaceDefault(e) {
6
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
7
- if (e) {
8
- for (const k in e) {
9
- if (k !== "default") {
10
- const d = Object.getOwnPropertyDescriptor(e, k);
11
- Object.defineProperty(n, k, d.get ? d : {
12
- enumerable: true,
13
- get: () => e[k]
14
- });
15
- }
16
- }
17
- }
18
- n.default = e;
19
- return Object.freeze(n);
20
- }
21
- const packageJsonPlugin__namespace = /* @__PURE__ */ _interopNamespaceDefault(packageJsonPlugin);
22
- const packageJson = () => ({
23
- name: "lzear/package-json",
24
- files: ["**/package.json"],
25
- plugins: {
26
- "package-json": packageJsonPlugin__namespace
27
- },
28
- languageOptions: {
29
- parser: jsoncParser
30
- },
31
- rules: packageJsonPlugin__namespace.configs.recommended.rules
32
- });
33
- exports.packageJson = packageJson;
@@ -1,16 +0,0 @@
1
- import * as packageJsonPlugin from "eslint-plugin-package-json";
2
- import jsoncParser from "jsonc-eslint-parser";
3
- const packageJson = () => ({
4
- name: "lzear/package-json",
5
- files: ["**/package.json"],
6
- plugins: {
7
- "package-json": packageJsonPlugin
8
- },
9
- languageOptions: {
10
- parser: jsoncParser
11
- },
12
- rules: packageJsonPlugin.configs.recommended.rules
13
- });
14
- export {
15
- packageJson
16
- };
@@ -1,73 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") {
10
- for (let key of __getOwnPropNames(from))
11
- if (!__hasOwnProp.call(to, key) && key !== except)
12
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- }
14
- return to;
15
- };
16
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
18
- mod
19
- ));
20
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
21
- const utils = require("../../utils.cjs");
22
- const perfectionist = async (config) => {
23
- if (!config.perfectionist) {
24
- return {};
25
- }
26
- const perfectionistPlugin = await utils.interopDefault(
27
- import("eslint-plugin-perfectionist")
28
- );
29
- const files = ["**/*.js", "**/*.cjs", "**/*.mjs"];
30
- if (config.typescript) {
31
- files.push("**/*.ts", "**/*.cts", "**/*.mts");
32
- }
33
- if (config.react) {
34
- files.push("**/*.jsx");
35
- if (config.typescript) {
36
- files.push("**/*.tsx");
37
- }
38
- }
39
- return {
40
- name: "lzear/perfectionist",
41
- files,
42
- plugins: {
43
- perfectionist: perfectionistPlugin
44
- },
45
- rules: {
46
- "perfectionist/sort-array-includes": ["error"],
47
- "perfectionist/sort-classes": ["error"],
48
- "perfectionist/sort-decorators": ["error"],
49
- "perfectionist/sort-enums": ["error"],
50
- "perfectionist/sort-exports": ["error"],
51
- "perfectionist/sort-heritage-clauses": ["error"],
52
- "perfectionist/sort-interfaces": ["error"],
53
- "perfectionist/sort-intersection-types": ["error"],
54
- "perfectionist/sort-jsx-props": ["error"],
55
- "perfectionist/sort-maps": ["error"],
56
- "perfectionist/sort-named-exports": ["error"],
57
- "perfectionist/sort-named-imports": ["error"],
58
- "perfectionist/sort-object-types": ["error"],
59
- "perfectionist/sort-objects": ["error"],
60
- "perfectionist/sort-sets": ["error"],
61
- "perfectionist/sort-switch-case": ["error"],
62
- "perfectionist/sort-union-types": ["error"],
63
- "perfectionist/sort-variable-declarations": ["error"]
64
- },
65
- settings: {
66
- perfectionist: {
67
- order: "desc",
68
- type: "line-length"
69
- }
70
- }
71
- };
72
- };
73
- exports.perfectionist = perfectionist;
@@ -1,55 +0,0 @@
1
- import { interopDefault } from "../../utils.mjs";
2
- const perfectionist = async (config) => {
3
- if (!config.perfectionist) {
4
- return {};
5
- }
6
- const perfectionistPlugin = await interopDefault(
7
- import("eslint-plugin-perfectionist")
8
- );
9
- const files = ["**/*.js", "**/*.cjs", "**/*.mjs"];
10
- if (config.typescript) {
11
- files.push("**/*.ts", "**/*.cts", "**/*.mts");
12
- }
13
- if (config.react) {
14
- files.push("**/*.jsx");
15
- if (config.typescript) {
16
- files.push("**/*.tsx");
17
- }
18
- }
19
- return {
20
- name: "lzear/perfectionist",
21
- files,
22
- plugins: {
23
- perfectionist: perfectionistPlugin
24
- },
25
- rules: {
26
- "perfectionist/sort-array-includes": ["error"],
27
- "perfectionist/sort-classes": ["error"],
28
- "perfectionist/sort-decorators": ["error"],
29
- "perfectionist/sort-enums": ["error"],
30
- "perfectionist/sort-exports": ["error"],
31
- "perfectionist/sort-heritage-clauses": ["error"],
32
- "perfectionist/sort-interfaces": ["error"],
33
- "perfectionist/sort-intersection-types": ["error"],
34
- "perfectionist/sort-jsx-props": ["error"],
35
- "perfectionist/sort-maps": ["error"],
36
- "perfectionist/sort-named-exports": ["error"],
37
- "perfectionist/sort-named-imports": ["error"],
38
- "perfectionist/sort-object-types": ["error"],
39
- "perfectionist/sort-objects": ["error"],
40
- "perfectionist/sort-sets": ["error"],
41
- "perfectionist/sort-switch-case": ["error"],
42
- "perfectionist/sort-union-types": ["error"],
43
- "perfectionist/sort-variable-declarations": ["error"]
44
- },
45
- settings: {
46
- perfectionist: {
47
- order: "desc",
48
- type: "line-length"
49
- }
50
- }
51
- };
52
- };
53
- export {
54
- perfectionist
55
- };