@zemd/eslint-js 1.1.21 → 2.0.0
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/README.md +13 -9
- package/dist/index.d.mts +43 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +18 -13
- package/dist/index.cjs +0 -1
- package/dist/index.d.cts +0 -30
- package/dist/index.d.ts +0 -30
- package/dist/index.js +0 -1
package/README.md
CHANGED
|
@@ -7,15 +7,15 @@ This package includes a set of ESLint configurations for **JavaScript** projects
|
|
|
7
7
|
|
|
8
8
|
**The package includes**:
|
|
9
9
|
|
|
10
|
-
| Package | Description
|
|
11
|
-
| ------------------------------------------------- |
|
|
12
|
-
| `eslint-config-flat-gitignore` | ignores all files from your `.gitignore` file
|
|
13
|
-
| `@eslint/js` | standard ESLint rules
|
|
14
|
-
| `eslint-plugin-unicorn` | modern set of rules
|
|
15
|
-
| `eslint-plugin-sonarjs` | ESLint plugin maintained by Sonar, designed to help developers write Clean Code
|
|
16
|
-
| `@eslint-community/eslint-plugin-eslint-comments` | additional ESLint rules for ESLint directive comments (e.g. //eslint-disable-line)
|
|
17
|
-
| `@eslint/json` | plugin that allows you to natively lint JSON and JSONC
|
|
18
|
-
| `eslint-plugin-regexp` | ESLint plugin for finding RegExp mistakes
|
|
10
|
+
| Package | Description | Rules | License |
|
|
11
|
+
| ------------------------------------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------- |
|
|
12
|
+
| `eslint-config-flat-gitignore` | ignores all files from your `.gitignore` file | | MIT |
|
|
13
|
+
| `@eslint/js` | standard ESLint rules | `recommended` plus hand-picked rules that were not included | MIT |
|
|
14
|
+
| `eslint-plugin-unicorn` | modern set of rules | I think pretty opinionated, so I carefully hand-picked rules, avoiding style related rules | MIT |
|
|
15
|
+
| `eslint-plugin-sonarjs` | (Optional) ESLint plugin maintained by Sonar, designed to help developers write Clean Code | all `recommended` rules minus some disabled for better DX (auto-enabled when installed) | LGPL-3.0-only |
|
|
16
|
+
| `@eslint-community/eslint-plugin-eslint-comments` | additional ESLint rules for ESLint directive comments (e.g. //eslint-disable-line) | `recommended` rules | MIT |
|
|
17
|
+
| `@eslint/json` | plugin that allows you to natively lint JSON and JSONC | `recommended` rules minus the `sort-keys` | Apache-2.0 |
|
|
18
|
+
| `eslint-plugin-regexp` | ESLint plugin for finding RegExp mistakes | `recommended` rules | MIT |
|
|
19
19
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
@@ -32,6 +32,10 @@ import javascript from "@zemd/eslint-js";
|
|
|
32
32
|
export default [...javascript()];
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
+
## SonarJS rules (optional)
|
|
36
|
+
|
|
37
|
+
To stay compliant with enterprise policies that forbid LGPL software, SonarJS rules are **optional**. If you want to use them, install `eslint-plugin-sonarjs` and the rules will be detected and enabled automatically.
|
|
38
|
+
|
|
35
39
|
## You might be also interested in
|
|
36
40
|
|
|
37
41
|
| Package | Version | Description |
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { JSONLanguageOptions } from "@eslint/json";
|
|
2
|
+
import { Linter } from "eslint";
|
|
3
|
+
export * from "@zemd/eslint-common";
|
|
4
|
+
|
|
5
|
+
//#region src/json.d.ts
|
|
6
|
+
type JSONOptions = {
|
|
7
|
+
jsonFiles: string[];
|
|
8
|
+
jsoncFiles: string[];
|
|
9
|
+
jsoncLanguageOptions: JSONLanguageOptions;
|
|
10
|
+
json5Files: string[];
|
|
11
|
+
};
|
|
12
|
+
declare function json({
|
|
13
|
+
jsonFiles,
|
|
14
|
+
jsoncFiles,
|
|
15
|
+
json5Files,
|
|
16
|
+
jsoncLanguageOptions
|
|
17
|
+
}?: Partial<JSONOptions>): Array<Linter.Config>;
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/index.d.ts
|
|
20
|
+
/**
|
|
21
|
+
* The ECMAScript version of the code being linted.
|
|
22
|
+
*/
|
|
23
|
+
type EcmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | "latest";
|
|
24
|
+
/**
|
|
25
|
+
* The type of JavaScript source code.
|
|
26
|
+
*/
|
|
27
|
+
type SourceType = "script" | "module" | "commonjs";
|
|
28
|
+
type JavascriptOptions = {
|
|
29
|
+
globals: Record<string, "readonly" | "writable" | "off">;
|
|
30
|
+
ecmaVersion: EcmaVersion;
|
|
31
|
+
sourceType: SourceType;
|
|
32
|
+
files: string[];
|
|
33
|
+
};
|
|
34
|
+
declare function javascript({
|
|
35
|
+
ecmaVersion,
|
|
36
|
+
sourceType,
|
|
37
|
+
files,
|
|
38
|
+
...opts
|
|
39
|
+
}?: Partial<JavascriptOptions>): Array<Linter.Config>;
|
|
40
|
+
declare function export_default(...params: Parameters<typeof javascript>): Array<Linter.Config>;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { export_default as default, javascript, json };
|
|
43
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/json.ts","../src/index.ts"],"mappings":";;;;;KAUK,WAAA;EACH,SAAA;EACA,UAAA;EACA,oBAAA,EAAsB,mBAAA;EACtB,UAAA;AAAA;AAAA,iBAGc,IAAA,CAAA;EACd,SAAA;EACA,UAAA;EACA,UAAA;EACA;AAAA,IACC,OAAA,CAAQ,WAAA,IAAoB,KAAA,CAAM,MAAA,CAAO,MAAA;;;;;;KCJvC,WAAA;;;;KAgCA,UAAA;AAAA,KAEA,iBAAA;EACH,OAAA,EAAS,MAAA;EACT,WAAA,EAAa,WAAA;EACb,UAAA,EAAY,UAAA;EACZ,KAAA;AAAA;AAAA,iBAGc,UAAA,CAAA;EACd,WAAA;EACA,UAAA;EACA,KAAA;EAAA,GACG;AAAA,IACF,OAAA,CAAQ,iBAAA,IAA0B,KAAA,CAAM,MAAA,CAAO,MAAA;AAAA,iBA6DjD,cAAA,CAAA,GAE2B,MAAA,EAAQ,UAAA,QAAkB,UAAA,IAAc,KAAA,CAAM,MAAA,CAAO,MAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as e}from"module";import t from"eslint-plugin-unicorn";import n from"@eslint/js";import{GLOB_JSON as r,GLOB_JSON5 as i,GLOB_JSONC as a,GLOB_JSONC_TSCONFIG as o,GLOB_JSONC_VSCODE as s,GLOB_SRC as c}from"@zemd/eslint-common";import l from"@eslint-community/eslint-plugin-eslint-comments";import u from"eslint-config-flat-gitignore";import d from"globals";import f from"@eslint/json";import*as p from"eslint-plugin-regexp";import{isPackageExists as m}from"local-pkg";export*from"@zemd/eslint-common";var h={plugins:{unicorn:t},rules:{"unicorn/error-message":`error`,"unicorn/escape-case":`error`,"unicorn/expiring-todo-comments":`error`,"unicorn/explicit-length-check":`error`,"unicorn/consistent-existence-index-check":`error`,"unicorn/new-for-builtins":`error`,"unicorn/no-abusive-eslint-disable":`error`,"unicorn/no-array-callback-reference":`error`,"unicorn/no-array-for-each":`error`,"unicorn/no-array-method-this-argument":`error`,"unicorn/no-await-expression-member":`error`,"unicorn/no-empty-file":`error`,"unicorn/no-invalid-remove-event-listener":`error`,"unicorn/no-new-buffer":`error`,"unicorn/no-this-assignment":`error`,"unicorn/no-unnecessary-await":`error`,"unicorn/no-useless-fallback-in-spread":`error`,"unicorn/no-useless-length-check":`error`,"unicorn/no-useless-promise-resolve-reject":`error`,"unicorn/no-useless-spread":`error`,"unicorn/no-useless-switch-case":`error`,"unicorn/no-zero-fractions":`error`,"unicorn/no-single-promise-in-promise-methods":`error`,"unicorn/no-await-in-promise-methods":`error`,"unicorn/no-invalid-fetch-options":`error`,"unicorn/no-negation-in-equality-check":`error`,"unicorn/number-literal-case":`error`,"unicorn/numeric-separators-style":`error`,"unicorn/prefer-add-event-listener":`error`,"unicorn/prefer-array-find":`error`,"unicorn/prefer-array-flat-map":`error`,"unicorn/prefer-array-flat":`error`,"unicorn/prefer-at":`error`,"unicorn/prefer-blob-reading-methods":`error`,"unicorn/prefer-code-point":`error`,"unicorn/prefer-date-now":`error`,"unicorn/prefer-dom-node-append":`error`,"unicorn/prefer-dom-node-dataset":`error`,"unicorn/prefer-dom-node-remove":`error`,"unicorn/prefer-event-target":`error`,"unicorn/prefer-export-from":`error`,"unicorn/prefer-keyboard-event-key":`error`,"unicorn/prefer-logical-operator-over-ternary":`error`,"unicorn/prefer-modern-dom-apis":`error`,"unicorn/prefer-modern-math-apis":`error`,"unicorn/prefer-negative-index":`error`,"unicorn/prefer-node-protocol":`error`,"unicorn/prefer-number-properties":`error`,"unicorn/prefer-optional-catch-binding":`error`,"unicorn/prefer-prototype-methods":`error`,"unicorn/prefer-query-selector":`error`,"unicorn/prefer-reflect-apply":`error`,"unicorn/prefer-regexp-test":`error`,"unicorn/prefer-set-size":`error`,"unicorn/prefer-string-replace-all":`error`,"unicorn/prefer-string-slice":`error`,"unicorn/prefer-string-starts-ends-with":`error`,"unicorn/prefer-string-trim-start-end":`error`,"unicorn/prefer-type-error":`error`,"unicorn/prefer-string-raw":`error`,"unicorn/prefer-structured-clone":`error`,"unicorn/prefer-math-min-max":`error`,"unicorn/prefer-global-this":`error`,"unicorn/prefer-import-meta-properties":`error`,"unicorn/relative-url-style":`error`,"unicorn/require-array-join-separator":`error`,"unicorn/require-number-to-fixed-digits-argument":`error`,"unicorn/switch-case-braces":`error`,"unicorn/text-encoding-identifier-case":`error`,"unicorn/throw-new-error":`error`,"unicorn/consistent-date-clone":`error`,"unicorn/no-named-default":`error`,"unicorn/no-instanceof-builtins":[`error`,{strategy:`loose`}],"unicorn/no-accessor-recursion":`error`,"unicorn/no-unnecessary-array-splice-count":`error`,"unicorn/prefer-class-fields":`error`,"unicorn/no-array-reverse":[`error`,{allowExpressionStatement:!0}],"unicorn/require-module-specifiers":`error`,"unicorn/no-useless-error-capture-stack-trace":`error`,"unicorn/prefer-bigint-literals":`error`,"unicorn/prefer-classlist-toggle":`error`,"unicorn/require-module-attributes":`error`,"unicorn/no-array-sort":`error`,"unicorn/no-immediate-mutation":`error`,"unicorn/no-useless-collection-argument":`error`,"unicorn/prefer-response-static-json":`error`}};const g={"no-promise-executor-return":[`error`],"no-unreachable-loop":[`error`],"no-caller":[`error`],"no-extend-native":[`error`],"no-extra-bind":[`error`],"no-extra-label":[`error`],"no-multi-str":[`error`],"no-new-wrappers":[`error`],"no-object-constructor":[`error`],"no-restricted-properties":[`error`,{object:`global`,property:`isFinite`,message:`Please use Number.isFinite instead`},{object:`self`,property:`isFinite`,message:`Please use Number.isFinite instead`},{object:`window`,property:`isFinite`,message:`Please use Number.isFinite instead`},{object:`global`,property:`isNaN`,message:`Please use Number.isNaN instead`},{object:`self`,property:`isNaN`,message:`Please use Number.isNaN instead`},{object:`window`,property:`isNaN`,message:`Please use Number.isNaN instead`}],"no-octal-escape":[`error`],"no-proto":[`error`],"no-sequences":[`error`,{allowInParentheses:!0}],"no-void":[`error`],"no-array-constructor":[`error`],"no-multi-assign":[`error`],"no-plusplus":[`error`],"no-useless-call":[`error`],"no-unassigned-vars":[`error`],"prefer-object-has-own":[`error`],"no-lone-blocks":[`error`],"no-return-assign":[`error`,`always`],"no-else-return":[`error`],"prefer-template":[`error`],"no-param-reassign":[`error`],"array-callback-return":[`error`,{allowImplicit:!0,checkForEach:!0}],eqeqeq:[`error`],"prefer-arrow-callback":[`error`],"arrow-body-style":[`error`,`always`],"no-restricted-syntax":[`error`,{selector:`TSEnumDeclaration`,message:`Avoid enums. Use union types instead.`}],"preserve-caught-error":[`error`]};var _={plugins:{eslint:n},rules:{...n.configs.recommended.rules,...g}};function v({jsonFiles:e=[r],jsoncFiles:t=[a,o,s],json5Files:n=[i],jsoncLanguageOptions:c={}}={}){return[{name:`zemd/json/setup`,plugins:{json:f}},{name:`zemd/json/files`,files:e,language:`json/json`,rules:{...f.configs.recommended.rules}},{name:`zemd/jsonc/files`,files:t,language:`json/jsonc`,languageOptions:c,rules:{...f.configs.recommended.rules}},{name:`zemd/json5/files`,files:n,language:`json/json5`,rules:{...f.configs.recommended.rules}}]}var y=v;const b=e(import.meta.url);function x({ecmaVersion:e=2022,sourceType:t=`module`,files:n=[c],...r}={}){let i=m(`eslint-plugin-sonarjs`)?b(`eslint-plugin-sonarjs`):void 0;return[u({name:`zemd/gitignore/ignores`}),{name:`zemd/javascript/files`,languageOptions:{sourceType:`commonjs`},files:[`eslint.config.js`]},{name:`zemd/javascript/setup`,languageOptions:{ecmaVersion:e,globals:{...d.browser,...d.es2023,...d.node,document:`readonly`,navigator:`readonly`,window:`readonly`,...r.globals},sourceType:t}},{name:`zemd/javascript/rules`,files:n,plugins:{..._.plugins,...h.plugins,...i?{sonarjs:i}:{},"@eslint-community/eslint-comments":l,regexp:p.configs[`flat/recommended`].plugins.regexp},rules:{..._.rules,...h.rules,...i?i.configs.recommended.rules:{},...i?{"sonarjs/no-clear-text-protocols":[`off`],"sonarjs/no-useless-intersection":[`off`],"sonarjs/todo-tag":[`off`]}:{},...l.configs.recommended.rules,...p.configs[`flat/recommended`].rules}}]}function S(...e){return[...x(...e),...y()]}export{S as default,x as javascript,v as json};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["rules","feature","eslint","unicorn","json"],"sources":["../src/rules/unicorn.ts","../src/rules/eslint.ts","../src/json.ts","../src/index.ts"],"sourcesContent":["import type { Feature } from \"@zemd/eslint-common\";\nimport type { Linter } from \"eslint\";\nimport unicorn from \"eslint-plugin-unicorn\";\n\n//recommended is not following the idea of this package,\n// so I hand picked some rules that I think are useful\nexport const rules: Linter.RulesRecord = {\n \"unicorn/error-message\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/error-message.md\n \"unicorn/escape-case\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/escape-case.md\n \"unicorn/expiring-todo-comments\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/expiring-todo-comments.md\n \"unicorn/explicit-length-check\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/explicit-length-check.md\n \"unicorn/consistent-existence-index-check\": \"error\", // (Dec 2024) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-existence-index-check.md\n \"unicorn/new-for-builtins\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/new-for-builtins.md\n \"unicorn/no-abusive-eslint-disable\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-abusive-eslint-disable.md\n \"unicorn/no-array-callback-reference\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-callback-reference.md\n \"unicorn/no-array-for-each\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-for-each.md\n \"unicorn/no-array-method-this-argument\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-method-this-argument.md\n \"unicorn/no-await-expression-member\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md\n \"unicorn/no-empty-file\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-empty-file.md\n \"unicorn/no-invalid-remove-event-listener\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-remove-event-listener.md\n \"unicorn/no-new-buffer\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-buffer.md\n \"unicorn/no-this-assignment\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-this-assignment.md\n \"unicorn/no-unnecessary-await\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-await.md\n \"unicorn/no-useless-fallback-in-spread\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-fallback-in-spread.md\n \"unicorn/no-useless-length-check\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-length-check.md\n \"unicorn/no-useless-promise-resolve-reject\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-promise-resolve-reject.md\n \"unicorn/no-useless-spread\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-spread.md\n \"unicorn/no-useless-switch-case\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-switch-case.md\n \"unicorn/no-zero-fractions\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-zero-fractions.md\n \"unicorn/no-single-promise-in-promise-methods\": \"error\", // (Dec 2024) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-single-promise-in-promise-methods.md\n \"unicorn/no-await-in-promise-methods\": \"error\", // (Dec 2024) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-in-promise-methods.md\n \"unicorn/no-invalid-fetch-options\": \"error\", // (Dec 2024) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-fetch-options.md\n \"unicorn/no-negation-in-equality-check\": \"error\", // (Dec 2024) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negation-in-equality-check.md\n \"unicorn/number-literal-case\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/number-literal-case.md\n \"unicorn/numeric-separators-style\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/numeric-separators-style.md\n \"unicorn/prefer-add-event-listener\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-add-event-listener.md\n \"unicorn/prefer-array-find\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-find.md\n \"unicorn/prefer-array-flat-map\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat-map.md\n \"unicorn/prefer-array-flat\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat.md\n \"unicorn/prefer-at\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md\n \"unicorn/prefer-blob-reading-methods\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-blob-reading-methods.md\n \"unicorn/prefer-code-point\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-code-point.md\n \"unicorn/prefer-date-now\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-date-now.md\n \"unicorn/prefer-dom-node-append\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-append.md\n \"unicorn/prefer-dom-node-dataset\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-dataset.md\n \"unicorn/prefer-dom-node-remove\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-remove.md\n \"unicorn/prefer-event-target\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-event-target.md\n \"unicorn/prefer-export-from\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-export-from.md\n \"unicorn/prefer-keyboard-event-key\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-keyboard-event-key.md\n \"unicorn/prefer-logical-operator-over-ternary\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-logical-operator-over-ternary.md\n \"unicorn/prefer-modern-dom-apis\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-dom-apis.md\n \"unicorn/prefer-modern-math-apis\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-math-apis.md\n \"unicorn/prefer-negative-index\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-negative-index.md\n \"unicorn/prefer-node-protocol\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md\n \"unicorn/prefer-number-properties\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-number-properties.md\n \"unicorn/prefer-optional-catch-binding\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-optional-catch-binding.md\n \"unicorn/prefer-prototype-methods\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-prototype-methods.md\n \"unicorn/prefer-query-selector\": \"error\", // (???) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-query-selector.md\n \"unicorn/prefer-reflect-apply\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-reflect-apply.md\n \"unicorn/prefer-regexp-test\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-regexp-test.md\n \"unicorn/prefer-set-size\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-size.md\n \"unicorn/prefer-string-replace-all\": \"error\", // (???) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md\n \"unicorn/prefer-string-slice\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-slice.md\n \"unicorn/prefer-string-starts-ends-with\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-starts-ends-with.md\n \"unicorn/prefer-string-trim-start-end\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-trim-start-end.md\n \"unicorn/prefer-type-error\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md\n \"unicorn/prefer-string-raw\": \"error\", // (Dec 2024) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-raw.md\n \"unicorn/prefer-structured-clone\": \"error\", // (Dec 2024) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-structured-clone.md\n \"unicorn/prefer-math-min-max\": \"error\", // (Dec 2024) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-min-max.md\n \"unicorn/prefer-global-this\": \"error\", // (Dec 2024) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-global-this.md\n \"unicorn/prefer-import-meta-properties\": \"error\", // (Apr 2025) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-import-meta-properties.md\n \"unicorn/relative-url-style\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/relative-url-style.md\n \"unicorn/require-array-join-separator\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-array-join-separator.md\n \"unicorn/require-number-to-fixed-digits-argument\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-number-to-fixed-digits-argument.md\n \"unicorn/switch-case-braces\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md\n \"unicorn/text-encoding-identifier-case\": \"error\", // (???) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/text-encoding-identifier-case.md\n \"unicorn/throw-new-error\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/throw-new-error.md\n \"unicorn/consistent-date-clone\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-date-clone.md\n \"unicorn/no-named-default\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-named-default.md\n // \"unicorn/consistent-assert\": \"error\", // this is more stylistic rule, which might annoy. Disabling for now. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-assert.md\n \"unicorn/no-instanceof-builtins\": [\"error\", { strategy: \"loose\" }], // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-builtins.md\n \"unicorn/no-accessor-recursion\": \"error\", // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-accessor-recursion.md\n \"unicorn/no-unnecessary-array-splice-count\": \"error\", // (Apr 2025) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-array-splice-count.md\n \"unicorn/prefer-class-fields\": \"error\", // (July 2025) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-class-fields.md\n \"unicorn/no-array-reverse\": [\"error\", { allowExpressionStatement: true }], // (July 2025) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-reverse.md\n \"unicorn/require-module-specifiers\": \"error\", // (July 2025) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-module-specifiers.md\n \"unicorn/no-useless-error-capture-stack-trace\": \"error\", // (July 2025) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-error-capture-stack-trace.md\n \"unicorn/prefer-bigint-literals\": \"error\", // (added in Unicorn v61.0.0) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-bigint-literals.md\n \"unicorn/prefer-classlist-toggle\": \"error\", // (added in Unicorn v61.0.0) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-classlist-toggle.md\n \"unicorn/require-module-attributes\": \"error\", // (added in Unicorn v61.0.0) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-module-attributes.md\n \"unicorn/no-array-sort\": \"error\", // (added in Unicorn v61.0.0) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-sort.md\n \"unicorn/no-immediate-mutation\": \"error\", // (added in Unicorn v62.0.0) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-immediate-mutation.md\n \"unicorn/no-useless-collection-argument\": \"error\", // (added in Unicorn v62.0.0) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-collection-argument.md\n \"unicorn/prefer-response-static-json\": \"error\", // (added in Unicorn v62.0.0) https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-response-static-json.md\n};\n\nconst feature: Feature = {\n plugins: {\n unicorn,\n },\n rules,\n};\n\nexport default feature;\n","import type { Linter } from \"eslint\";\nimport eslint from \"@eslint/js\";\nimport type { Feature } from \"@zemd/eslint-common\";\n\nexport const rules: Linter.RulesRecord = {\n \"no-promise-executor-return\": [\n // https://eslint.org/docs/latest/rules/no-promise-executor-return\n \"error\",\n ],\n \"no-unreachable-loop\": [\n // https://eslint.org/docs/latest/rules/no-unreachable-loop\n \"error\",\n ],\n \"no-caller\": [\n // https://eslint.org/docs/latest/rules/no-caller\n \"error\",\n ],\n \"no-extend-native\": [\n // https://eslint.org/docs/latest/rules/no-extend-native\n \"error\",\n ],\n \"no-extra-bind\": [\n // https://eslint.org/docs/latest/rules/no-extra-bind\n \"error\",\n ],\n \"no-extra-label\": [\n // https://eslint.org/docs/latest/rules/no-extra-label\n \"error\",\n ],\n \"no-multi-str\": [\n // https://eslint.org/docs/latest/rules/no-multi-str\n \"error\",\n ],\n \"no-new-wrappers\": [\n // https://eslint.org/docs/latest/rules/no-new-wrappers\n \"error\",\n ],\n \"no-object-constructor\": [\n // https://eslint.org/docs/latest/rules/no-object-constructor\n \"error\",\n ],\n \"no-restricted-properties\": [\n // https://eslint.org/docs/latest/rules/no-restricted-properties\n \"error\",\n {\n object: \"global\",\n property: \"isFinite\",\n message: \"Please use Number.isFinite instead\",\n },\n {\n object: \"self\",\n property: \"isFinite\",\n message: \"Please use Number.isFinite instead\",\n },\n {\n object: \"window\",\n property: \"isFinite\",\n message: \"Please use Number.isFinite instead\",\n },\n {\n object: \"global\",\n property: \"isNaN\",\n message: \"Please use Number.isNaN instead\",\n },\n {\n object: \"self\",\n property: \"isNaN\",\n message: \"Please use Number.isNaN instead\",\n },\n {\n object: \"window\",\n property: \"isNaN\",\n message: \"Please use Number.isNaN instead\",\n },\n ],\n \"no-octal-escape\": [\n // https://eslint.org/docs/latest/rules/no-octal-escape\n \"error\",\n ],\n \"no-proto\": [\n // https://eslint.org/docs/latest/rules/no-proto\n \"error\",\n ],\n \"no-sequences\": [\n // https://eslint.org/docs/latest/rules/no-sequences\n \"error\",\n { allowInParentheses: true },\n ],\n \"no-void\": [\n // https://eslint.org/docs/latest/rules/no-void\n \"error\",\n ],\n \"no-array-constructor\": [\n // https://eslint.org/docs/latest/rules/no-array-constructor\n \"error\",\n ],\n \"no-multi-assign\": [\n // https://eslint.org/docs/latest/rules/no-multi-assign\n \"error\",\n ],\n \"no-plusplus\": [\n // https://eslint.org/docs/latest/rules/no-plusplus\n \"error\",\n ],\n \"no-useless-call\": [\n // https://eslint.org/docs/latest/rules/no-useless-call\n \"error\",\n ],\n \"no-unassigned-vars\": [\n // https://eslint.org/docs/latest/rules/no-unassigned-vars\n \"error\",\n ],\n \"prefer-object-has-own\": [\n // https://eslint.org/docs/latest/rules/prefer-object-has-own\n \"error\",\n ],\n \"no-lone-blocks\": [\n // https://eslint.org/docs/latest/rules/no-lone-blocks\n \"error\",\n ],\n \"no-return-assign\": [\n // https://eslint.org/docs/latest/rules/no-return-assign\n \"error\",\n \"always\",\n ],\n \"no-else-return\": [\n // https://eslint.org/docs/latest/rules/no-else-return\n \"error\",\n ],\n \"prefer-template\": [\n // https://eslint.org/docs/latest/rules/prefer-template\n \"error\",\n ],\n \"no-param-reassign\": [\n // https://eslint.org/docs/latest/rules/no-param-reassign\n \"error\",\n ],\n \"array-callback-return\": [\n // https://eslint.org/docs/latest/rules/array-callback-return\n \"error\",\n { allowImplicit: true, checkForEach: true },\n ],\n eqeqeq: [\n // https://eslint.org/docs/latest/rules/eqeqeq\n \"error\",\n ],\n \"prefer-arrow-callback\": [\n // https://eslint.org/docs/latest/rules/prefer-arrow-callback\n \"error\",\n ],\n \"arrow-body-style\": [\n // https://eslint.org/docs/latest/rules/arrow-body-style\n \"error\",\n \"always\",\n ],\n \"no-restricted-syntax\": [\n // https://eslint.org/docs/latest/rules/no-restricted-syntax\n \"error\",\n {\n selector: \"TSEnumDeclaration\",\n message: \"Avoid enums. Use union types instead.\",\n },\n ],\n // \"no-use-before-define\": 0, // we are using the @typescript/eslint version\n // \"no-unused-expressions\": 0, // we are using the @typescript/eslint version\n // \"no-empty-function\": 0, // we are using the @typescript/eslint version\n // \"dot-notation\": 0, // we are using the @typescript/eslint version\n // \"no-shadow\": 0, // we are using the @typescript/eslint version\n // \"default-param-last\": 0, // we are using the @typescript/eslint version\n \"preserve-caught-error\": [\n // https://eslint.org/docs/latest/rules/preserve-caught-error (added in ESLint v9.35.0)\n \"error\",\n ],\n};\n\n// see more: https://github.com/eslint/eslint/blob/main/packages/js/src/configs/eslint-recommended.js\nconst feature: Feature = {\n plugins: {\n eslint,\n },\n rules: {\n ...eslint.configs.recommended.rules,\n ...rules,\n },\n};\nexport default feature;\n","import plugin, { type JSONLanguageOptions } from \"@eslint/json\";\nimport {\n GLOB_JSONC_VSCODE,\n GLOB_JSON,\n GLOB_JSON5,\n GLOB_JSONC,\n GLOB_JSONC_TSCONFIG,\n} from \"@zemd/eslint-common\";\nimport type { ESLint, Linter } from \"eslint\";\n\ntype JSONOptions = {\n jsonFiles: string[];\n jsoncFiles: string[];\n jsoncLanguageOptions: JSONLanguageOptions;\n json5Files: string[];\n};\n\nexport function json({\n jsonFiles = [GLOB_JSON],\n jsoncFiles = [GLOB_JSONC, GLOB_JSONC_TSCONFIG, GLOB_JSONC_VSCODE],\n json5Files = [GLOB_JSON5],\n jsoncLanguageOptions = {},\n}: Partial<JSONOptions> = {}): Array<Linter.Config> {\n const rules: Array<Linter.Config> = [\n {\n name: \"zemd/json/setup\",\n plugins: {\n json: plugin as unknown as ESLint.Plugin,\n },\n },\n {\n name: \"zemd/json/files\",\n files: jsonFiles,\n language: \"json/json\",\n rules: {\n ...plugin.configs.recommended.rules,\n },\n },\n {\n name: \"zemd/jsonc/files\",\n files: jsoncFiles,\n language: \"json/jsonc\",\n languageOptions: jsoncLanguageOptions as Linter.LanguageOptions,\n rules: {\n ...plugin.configs.recommended.rules,\n },\n },\n {\n name: \"zemd/json5/files\",\n files: json5Files,\n language: \"json/json5\",\n rules: {\n ...plugin.configs.recommended.rules,\n },\n },\n ];\n\n return rules;\n}\n\nexport default json;\n","import type { Linter } from \"eslint\";\nimport { createRequire } from \"module\";\nimport unicorn from \"./rules/unicorn.js\";\nimport eslint from \"./rules/eslint.js\";\nimport { GLOB_SRC } from \"@zemd/eslint-common\";\nimport comments from \"@eslint-community/eslint-plugin-eslint-comments\";\nimport gitignore from \"eslint-config-flat-gitignore\";\nimport globals from \"globals\";\nimport json from \"./json.js\";\nimport * as pluginRegex from \"eslint-plugin-regexp\";\nimport { isPackageExists } from \"local-pkg\";\n\nexport * from \"@zemd/eslint-common\";\nexport { json } from \"./json.js\";\n\n/**\n * The ECMAScript version of the code being linted.\n */\ntype EcmaVersion =\n | 3\n | 5\n | 6\n | 7\n | 8\n | 9\n | 10\n | 11\n | 12\n | 13\n | 14\n | 15\n | 16\n | 2015\n | 2016\n | 2017\n | 2018\n | 2019\n | 2020\n | 2021\n | 2022\n | 2023\n | 2024\n | 2025\n | \"latest\";\n\nconst require = createRequire(import.meta.url);\n\n/**\n * The type of JavaScript source code.\n */\ntype SourceType = \"script\" | \"module\" | \"commonjs\";\n\ntype JavascriptOptions = {\n globals: Record<string, \"readonly\" | \"writable\" | \"off\">;\n ecmaVersion: EcmaVersion;\n sourceType: SourceType;\n files: string[];\n};\n\nexport function javascript({\n ecmaVersion = 2022,\n sourceType = \"module\",\n files = [GLOB_SRC],\n ...opts\n}: Partial<JavascriptOptions> = {}): Array<Linter.Config> {\n const enableSonar = isPackageExists(\"eslint-plugin-sonarjs\");\n const sonarjs = enableSonar\n ? (require(\"eslint-plugin-sonarjs\") as typeof import(\"eslint-plugin-sonarjs\"))\n : undefined;\n\n const rules: Array<Linter.Config> = [\n gitignore({\n name: \"zemd/gitignore/ignores\",\n }),\n {\n name: \"zemd/javascript/files\",\n languageOptions: {\n sourceType: \"commonjs\",\n },\n files: [\"eslint.config.js\"],\n },\n {\n name: \"zemd/javascript/setup\",\n languageOptions: {\n ecmaVersion,\n globals: {\n ...globals.browser,\n ...globals.es2023,\n ...globals.node,\n document: \"readonly\",\n navigator: \"readonly\",\n window: \"readonly\",\n ...opts.globals,\n },\n sourceType,\n },\n },\n {\n name: \"zemd/javascript/rules\",\n files,\n plugins: {\n ...eslint.plugins,\n ...unicorn.plugins,\n ...(sonarjs ? { sonarjs } : {}), // https://github.com/SonarSource/SonarJS/blob/master/packages/jsts/src/rules/README.md#rules\n \"@eslint-community/eslint-comments\": comments,\n regexp: pluginRegex.configs[\"flat/recommended\"].plugins.regexp,\n },\n rules: {\n ...eslint.rules,\n ...unicorn.rules,\n ...(sonarjs ? sonarjs.configs.recommended.rules : {}),\n ...(sonarjs\n ? {\n \"sonarjs/no-clear-text-protocols\": [\"off\"],\n \"sonarjs/no-useless-intersection\": [\"off\"],\n \"sonarjs/todo-tag\": [\"off\"],\n }\n : {}),\n ...comments.configs.recommended.rules,\n ...pluginRegex.configs[\"flat/recommended\"].rules,\n },\n },\n ];\n\n return rules;\n}\n\nexport default function (...params: Parameters<typeof javascript>): Array<Linter.Config> {\n return [...javascript(...params), ...json()];\n}\n"],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zemd/eslint-js",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Shared ESLint config for javascript projects",
|
|
6
6
|
"keywords": [
|
|
@@ -34,37 +34,42 @@
|
|
|
34
34
|
"type": "module",
|
|
35
35
|
"exports": {
|
|
36
36
|
".": {
|
|
37
|
-
"import": "./dist/index.
|
|
38
|
-
"require": "./dist/index.cjs"
|
|
37
|
+
"import": "./dist/index.mjs"
|
|
39
38
|
}
|
|
40
39
|
},
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"types": "./dist/index.d.ts",
|
|
40
|
+
"module": "./dist/index.mjs",
|
|
41
|
+
"types": "./dist/index.d.mts",
|
|
44
42
|
"peerDependencies": {
|
|
45
|
-
"eslint": ">=9.2.0"
|
|
43
|
+
"eslint": ">=9.2.0",
|
|
44
|
+
"eslint-plugin-sonarjs": "^3.0.5"
|
|
45
|
+
},
|
|
46
|
+
"peerDependenciesMeta": {
|
|
47
|
+
"eslint-plugin-sonarjs": {
|
|
48
|
+
"optional": true
|
|
49
|
+
}
|
|
46
50
|
},
|
|
47
51
|
"dependencies": {
|
|
48
|
-
"@eslint-community/eslint-plugin-eslint-comments": "^4.
|
|
52
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
|
|
49
53
|
"@eslint/js": "^9.39.2",
|
|
50
54
|
"@eslint/json": "^0.14.0",
|
|
51
55
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
52
56
|
"eslint-plugin-regexp": "^2.10.0",
|
|
53
|
-
"eslint-plugin-sonarjs": "^3.0.5",
|
|
54
57
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
55
58
|
"globals": "^17.0.0",
|
|
56
|
-
"
|
|
59
|
+
"local-pkg": "^1.1.2",
|
|
60
|
+
"@zemd/eslint-common": "2.0.0"
|
|
57
61
|
},
|
|
58
62
|
"devDependencies": {
|
|
59
63
|
"@types/eslint": "^9.6.1",
|
|
64
|
+
"@types/node": "^25.0.9",
|
|
60
65
|
"@zemd/tsconfig": "^1.4.0",
|
|
61
66
|
"eslint": "^9.39.2",
|
|
62
|
-
"
|
|
67
|
+
"tsdown": "^0.20.0-beta.4",
|
|
63
68
|
"typescript": "^5.9.3"
|
|
64
69
|
},
|
|
65
70
|
"scripts": {
|
|
66
|
-
"build": "
|
|
67
|
-
"dev": "
|
|
71
|
+
"build": "tsdown --minify",
|
|
72
|
+
"dev": "tsdown --watch",
|
|
68
73
|
"lint": "publint"
|
|
69
74
|
}
|
|
70
75
|
}
|
package/dist/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var z=Object.create;var u=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,G=Object.prototype.hasOwnProperty;var l=(r,e)=>u(r,"name",{value:e,configurable:!0});var P=(r,e)=>{for(var s in e)u(r,s,{get:e[s],enumerable:!0})},m=(r,e,s,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of F(e))!G.call(r,a)&&a!==s&&u(r,a,{get:()=>e[a],enumerable:!(c=S(e,a))||c.enumerable});return r},n=(r,e,s)=>(m(r,e,"default"),s&&m(s,e,"default")),t=(r,e,s)=>(s=r!=null?z(_(r)):{},m(e||!r||!r.__esModule?u(s,"default",{value:r,enumerable:!0}):s,r)),B=r=>m(u({},"__esModule",{value:!0}),r);var o={};P(o,{default:()=>q,javascript:()=>k,json:()=>y});module.exports=B(o);var j=t(require("eslint-plugin-sonarjs"),1);var w=t(require("eslint-plugin-unicorn"),1),C={"unicorn/error-message":"error","unicorn/escape-case":"error","unicorn/expiring-todo-comments":"error","unicorn/explicit-length-check":"error","unicorn/consistent-existence-index-check":"error","unicorn/new-for-builtins":"error","unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-callback-reference":"error","unicorn/no-array-for-each":"error","unicorn/no-array-method-this-argument":"error","unicorn/no-await-expression-member":"error","unicorn/no-empty-file":"error","unicorn/no-invalid-remove-event-listener":"error","unicorn/no-new-buffer":"error","unicorn/no-this-assignment":"error","unicorn/no-unnecessary-await":"error","unicorn/no-useless-fallback-in-spread":"error","unicorn/no-useless-length-check":"error","unicorn/no-useless-promise-resolve-reject":"error","unicorn/no-useless-spread":"error","unicorn/no-useless-switch-case":"error","unicorn/no-zero-fractions":"error","unicorn/no-single-promise-in-promise-methods":"error","unicorn/no-await-in-promise-methods":"error","unicorn/no-invalid-fetch-options":"error","unicorn/no-negation-in-equality-check":"error","unicorn/number-literal-case":"error","unicorn/numeric-separators-style":"error","unicorn/prefer-add-event-listener":"error","unicorn/prefer-array-find":"error","unicorn/prefer-array-flat-map":"error","unicorn/prefer-array-flat":"error","unicorn/prefer-at":"error","unicorn/prefer-blob-reading-methods":"error","unicorn/prefer-code-point":"error","unicorn/prefer-date-now":"error","unicorn/prefer-dom-node-append":"error","unicorn/prefer-dom-node-dataset":"error","unicorn/prefer-dom-node-remove":"error","unicorn/prefer-event-target":"error","unicorn/prefer-export-from":"error","unicorn/prefer-keyboard-event-key":"error","unicorn/prefer-logical-operator-over-ternary":"error","unicorn/prefer-modern-dom-apis":"error","unicorn/prefer-modern-math-apis":"error","unicorn/prefer-negative-index":"error","unicorn/prefer-node-protocol":"error","unicorn/prefer-number-properties":"error","unicorn/prefer-optional-catch-binding":"error","unicorn/prefer-prototype-methods":"error","unicorn/prefer-query-selector":"error","unicorn/prefer-reflect-apply":"error","unicorn/prefer-regexp-test":"error","unicorn/prefer-set-size":"error","unicorn/prefer-string-replace-all":"error","unicorn/prefer-string-slice":"error","unicorn/prefer-string-starts-ends-with":"error","unicorn/prefer-string-trim-start-end":"error","unicorn/prefer-type-error":"error","unicorn/prefer-string-raw":"error","unicorn/prefer-structured-clone":"error","unicorn/prefer-math-min-max":"error","unicorn/prefer-global-this":"error","unicorn/prefer-import-meta-properties":"error","unicorn/relative-url-style":"error","unicorn/require-array-join-separator":"error","unicorn/require-number-to-fixed-digits-argument":"error","unicorn/switch-case-braces":"error","unicorn/text-encoding-identifier-case":"error","unicorn/throw-new-error":"error","unicorn/consistent-date-clone":"error","unicorn/no-named-default":"error","unicorn/no-instanceof-builtins":["error",{strategy:"loose"}],"unicorn/no-accessor-recursion":"error","unicorn/no-unnecessary-array-splice-count":"error","unicorn/prefer-class-fields":"error","unicorn/no-array-reverse":["error",{allowExpressionStatement:!0}],"unicorn/require-module-specifiers":"error","unicorn/no-useless-error-capture-stack-trace":"error","unicorn/prefer-bigint-literals":"error","unicorn/prefer-classlist-toggle":"error","unicorn/require-module-attributes":"error","unicorn/no-array-sort":"error","unicorn/no-immediate-mutation":"error","unicorn/no-useless-collection-argument":"error","unicorn/prefer-response-static-json":"error"},L={plugins:{unicorn:w.default},rules:C},d=L;var g=t(require("@eslint/js"),1),J={"no-promise-executor-return":["error"],"no-unreachable-loop":["error"],"no-caller":["error"],"no-extend-native":["error"],"no-extra-bind":["error"],"no-extra-label":["error"],"no-multi-str":["error"],"no-new-wrappers":["error"],"no-object-constructor":["error"],"no-restricted-properties":["error",{object:"global",property:"isFinite",message:"Please use Number.isFinite instead"},{object:"self",property:"isFinite",message:"Please use Number.isFinite instead"},{object:"window",property:"isFinite",message:"Please use Number.isFinite instead"},{object:"global",property:"isNaN",message:"Please use Number.isNaN instead"},{object:"self",property:"isNaN",message:"Please use Number.isNaN instead"},{object:"window",property:"isNaN",message:"Please use Number.isNaN instead"}],"no-octal-escape":["error"],"no-proto":["error"],"no-sequences":["error",{allowInParentheses:!0}],"no-void":["error"],"no-array-constructor":["error"],"no-multi-assign":["error"],"no-plusplus":["error"],"no-useless-call":["error"],"no-unassigned-vars":["error"],"prefer-object-has-own":["error"],"no-lone-blocks":["error"],"no-return-assign":["error","always"],"no-else-return":["error"],"prefer-template":["error"],"no-param-reassign":["error"],"array-callback-return":["error",{allowImplicit:!0,checkForEach:!0}],eqeqeq:["error"],"prefer-arrow-callback":["error"],"arrow-body-style":["error","always"],"no-restricted-syntax":["error",{selector:"TSEnumDeclaration",message:"Avoid enums. Use union types instead."}],"preserve-caught-error":["error"]},E={plugins:{eslint:g.default},rules:{...g.default.configs.recommended.rules,...J}},b=E;var N=require("@zemd/eslint-common"),x=t(require("@eslint-community/eslint-plugin-eslint-comments"),1),O=t(require("eslint-config-flat-gitignore"),1),f=t(require("globals"),1);var p=t(require("@eslint/json"),1),i=require("@zemd/eslint-common");function y({jsonFiles:r=[i.GLOB_JSON],jsoncFiles:e=[i.GLOB_JSONC,i.GLOB_JSONC_TSCONFIG,i.GLOB_JSONC_VSCODE],json5Files:s=[i.GLOB_JSON5],jsoncLanguageOptions:c={}}={}){return[{name:"zemd/json/setup",plugins:{json:p.default}},{name:"zemd/json/files",files:r,language:"json/json",rules:{...p.default.configs.recommended.rules}},{name:"zemd/jsonc/files",files:e,language:"json/jsonc",languageOptions:c,rules:{...p.default.configs.recommended.rules}},{name:"zemd/json5/files",files:s,language:"json/json5",rules:{...p.default.configs.recommended.rules}}]}l(y,"json");var v=y;var h=t(require("eslint-plugin-regexp"),1);n(o,require("@zemd/eslint-common"),module.exports);function k({ecmaVersion:r=2022,sourceType:e="module",files:s=[N.GLOB_SRC],...c}={}){return[(0,O.default)({name:"zemd/gitignore/ignores"}),{name:"zemd/javascript/files",languageOptions:{sourceType:"commonjs"},files:["eslint.config.js"]},{name:"zemd/javascript/setup",languageOptions:{ecmaVersion:r,globals:{...f.default.browser,...f.default.es2021,...f.default.node,document:"readonly",navigator:"readonly",window:"readonly",...c.globals},sourceType:e}},{name:"zemd/javascript/rules",files:s,plugins:{...b.plugins,...d.plugins,sonarjs:j.default,"@eslint-community/eslint-comments":x.default,regexp:h.configs["flat/recommended"].plugins.regexp},rules:{...b.rules,...d.rules,...j.default.configs.recommended.rules,"sonarjs/no-clear-text-protocols":["off"],"sonarjs/no-useless-intersection":["off"],"sonarjs/todo-tag":["off"],...x.default.configs.recommended.rules,...h.configs["flat/recommended"].rules}}]}l(k,"javascript");function q(...r){return[...k(...r),...v()]}l(q,"default");0&&(module.exports={javascript,json,...require("@zemd/eslint-common")});
|
package/dist/index.d.cts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Linter } from 'eslint';
|
|
2
|
-
export * from '@zemd/eslint-common';
|
|
3
|
-
import { JSONLanguageOptions } from '@eslint/json';
|
|
4
|
-
|
|
5
|
-
type JSONOptions = {
|
|
6
|
-
jsonFiles: string[];
|
|
7
|
-
jsoncFiles: string[];
|
|
8
|
-
jsoncLanguageOptions: JSONLanguageOptions;
|
|
9
|
-
json5Files: string[];
|
|
10
|
-
};
|
|
11
|
-
declare function json({ jsonFiles, jsoncFiles, json5Files, jsoncLanguageOptions, }?: Partial<JSONOptions>): Array<Linter.Config>;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* The ECMAScript version of the code being linted.
|
|
15
|
-
*/
|
|
16
|
-
type EcmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | "latest";
|
|
17
|
-
/**
|
|
18
|
-
* The type of JavaScript source code.
|
|
19
|
-
*/
|
|
20
|
-
type SourceType = "script" | "module" | "commonjs";
|
|
21
|
-
type JavascriptOptions = {
|
|
22
|
-
globals: Record<string, "readonly" | "writable" | "off">;
|
|
23
|
-
ecmaVersion: EcmaVersion;
|
|
24
|
-
sourceType: SourceType;
|
|
25
|
-
files: string[];
|
|
26
|
-
};
|
|
27
|
-
declare function javascript({ ecmaVersion, sourceType, files, ...opts }?: Partial<JavascriptOptions>): Array<Linter.Config>;
|
|
28
|
-
declare function export_default(...params: Parameters<typeof javascript>): Array<Linter.Config>;
|
|
29
|
-
|
|
30
|
-
export { export_default as default, javascript, json };
|
package/dist/index.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Linter } from 'eslint';
|
|
2
|
-
export * from '@zemd/eslint-common';
|
|
3
|
-
import { JSONLanguageOptions } from '@eslint/json';
|
|
4
|
-
|
|
5
|
-
type JSONOptions = {
|
|
6
|
-
jsonFiles: string[];
|
|
7
|
-
jsoncFiles: string[];
|
|
8
|
-
jsoncLanguageOptions: JSONLanguageOptions;
|
|
9
|
-
json5Files: string[];
|
|
10
|
-
};
|
|
11
|
-
declare function json({ jsonFiles, jsoncFiles, json5Files, jsoncLanguageOptions, }?: Partial<JSONOptions>): Array<Linter.Config>;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* The ECMAScript version of the code being linted.
|
|
15
|
-
*/
|
|
16
|
-
type EcmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | "latest";
|
|
17
|
-
/**
|
|
18
|
-
* The type of JavaScript source code.
|
|
19
|
-
*/
|
|
20
|
-
type SourceType = "script" | "module" | "commonjs";
|
|
21
|
-
type JavascriptOptions = {
|
|
22
|
-
globals: Record<string, "readonly" | "writable" | "off">;
|
|
23
|
-
ecmaVersion: EcmaVersion;
|
|
24
|
-
sourceType: SourceType;
|
|
25
|
-
files: string[];
|
|
26
|
-
};
|
|
27
|
-
declare function javascript({ ecmaVersion, sourceType, files, ...opts }?: Partial<JavascriptOptions>): Array<Linter.Config>;
|
|
28
|
-
declare function export_default(...params: Parameters<typeof javascript>): Array<Linter.Config>;
|
|
29
|
-
|
|
30
|
-
export { export_default as default, javascript, json };
|
package/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var b=Object.defineProperty;var o=(r,e)=>b(r,"name",{value:e,configurable:!0});import f from"eslint-plugin-sonarjs";import y from"eslint-plugin-unicorn";var j={"unicorn/error-message":"error","unicorn/escape-case":"error","unicorn/expiring-todo-comments":"error","unicorn/explicit-length-check":"error","unicorn/consistent-existence-index-check":"error","unicorn/new-for-builtins":"error","unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-callback-reference":"error","unicorn/no-array-for-each":"error","unicorn/no-array-method-this-argument":"error","unicorn/no-await-expression-member":"error","unicorn/no-empty-file":"error","unicorn/no-invalid-remove-event-listener":"error","unicorn/no-new-buffer":"error","unicorn/no-this-assignment":"error","unicorn/no-unnecessary-await":"error","unicorn/no-useless-fallback-in-spread":"error","unicorn/no-useless-length-check":"error","unicorn/no-useless-promise-resolve-reject":"error","unicorn/no-useless-spread":"error","unicorn/no-useless-switch-case":"error","unicorn/no-zero-fractions":"error","unicorn/no-single-promise-in-promise-methods":"error","unicorn/no-await-in-promise-methods":"error","unicorn/no-invalid-fetch-options":"error","unicorn/no-negation-in-equality-check":"error","unicorn/number-literal-case":"error","unicorn/numeric-separators-style":"error","unicorn/prefer-add-event-listener":"error","unicorn/prefer-array-find":"error","unicorn/prefer-array-flat-map":"error","unicorn/prefer-array-flat":"error","unicorn/prefer-at":"error","unicorn/prefer-blob-reading-methods":"error","unicorn/prefer-code-point":"error","unicorn/prefer-date-now":"error","unicorn/prefer-dom-node-append":"error","unicorn/prefer-dom-node-dataset":"error","unicorn/prefer-dom-node-remove":"error","unicorn/prefer-event-target":"error","unicorn/prefer-export-from":"error","unicorn/prefer-keyboard-event-key":"error","unicorn/prefer-logical-operator-over-ternary":"error","unicorn/prefer-modern-dom-apis":"error","unicorn/prefer-modern-math-apis":"error","unicorn/prefer-negative-index":"error","unicorn/prefer-node-protocol":"error","unicorn/prefer-number-properties":"error","unicorn/prefer-optional-catch-binding":"error","unicorn/prefer-prototype-methods":"error","unicorn/prefer-query-selector":"error","unicorn/prefer-reflect-apply":"error","unicorn/prefer-regexp-test":"error","unicorn/prefer-set-size":"error","unicorn/prefer-string-replace-all":"error","unicorn/prefer-string-slice":"error","unicorn/prefer-string-starts-ends-with":"error","unicorn/prefer-string-trim-start-end":"error","unicorn/prefer-type-error":"error","unicorn/prefer-string-raw":"error","unicorn/prefer-structured-clone":"error","unicorn/prefer-math-min-max":"error","unicorn/prefer-global-this":"error","unicorn/prefer-import-meta-properties":"error","unicorn/relative-url-style":"error","unicorn/require-array-join-separator":"error","unicorn/require-number-to-fixed-digits-argument":"error","unicorn/switch-case-braces":"error","unicorn/text-encoding-identifier-case":"error","unicorn/throw-new-error":"error","unicorn/consistent-date-clone":"error","unicorn/no-named-default":"error","unicorn/no-instanceof-builtins":["error",{strategy:"loose"}],"unicorn/no-accessor-recursion":"error","unicorn/no-unnecessary-array-splice-count":"error","unicorn/prefer-class-fields":"error","unicorn/no-array-reverse":["error",{allowExpressionStatement:!0}],"unicorn/require-module-specifiers":"error","unicorn/no-useless-error-capture-stack-trace":"error","unicorn/prefer-bigint-literals":"error","unicorn/prefer-classlist-toggle":"error","unicorn/require-module-attributes":"error","unicorn/no-array-sort":"error","unicorn/no-immediate-mutation":"error","unicorn/no-useless-collection-argument":"error","unicorn/prefer-response-static-json":"error"},x={plugins:{unicorn:y},rules:j},t=x;import l from"@eslint/js";var h={"no-promise-executor-return":["error"],"no-unreachable-loop":["error"],"no-caller":["error"],"no-extend-native":["error"],"no-extra-bind":["error"],"no-extra-label":["error"],"no-multi-str":["error"],"no-new-wrappers":["error"],"no-object-constructor":["error"],"no-restricted-properties":["error",{object:"global",property:"isFinite",message:"Please use Number.isFinite instead"},{object:"self",property:"isFinite",message:"Please use Number.isFinite instead"},{object:"window",property:"isFinite",message:"Please use Number.isFinite instead"},{object:"global",property:"isNaN",message:"Please use Number.isNaN instead"},{object:"self",property:"isNaN",message:"Please use Number.isNaN instead"},{object:"window",property:"isNaN",message:"Please use Number.isNaN instead"}],"no-octal-escape":["error"],"no-proto":["error"],"no-sequences":["error",{allowInParentheses:!0}],"no-void":["error"],"no-array-constructor":["error"],"no-multi-assign":["error"],"no-plusplus":["error"],"no-useless-call":["error"],"no-unassigned-vars":["error"],"prefer-object-has-own":["error"],"no-lone-blocks":["error"],"no-return-assign":["error","always"],"no-else-return":["error"],"prefer-template":["error"],"no-param-reassign":["error"],"array-callback-return":["error",{allowImplicit:!0,checkForEach:!0}],eqeqeq:["error"],"prefer-arrow-callback":["error"],"arrow-body-style":["error","always"],"no-restricted-syntax":["error",{selector:"TSEnumDeclaration",message:"Avoid enums. Use union types instead."}],"preserve-caught-error":["error"]},w={plugins:{eslint:l},rules:{...l.configs.recommended.rules,...h}},a=w;import{GLOB_SRC as z}from"@zemd/eslint-common";import d from"@eslint-community/eslint-plugin-eslint-comments";import S from"eslint-config-flat-gitignore";import c from"globals";import n from"@eslint/json";import{GLOB_JSONC_VSCODE as v,GLOB_JSON as N,GLOB_JSON5 as O,GLOB_JSONC as k,GLOB_JSONC_TSCONFIG as q}from"@zemd/eslint-common";function p({jsonFiles:r=[N],jsoncFiles:e=[k,q,v],json5Files:s=[O],jsoncLanguageOptions:i={}}={}){return[{name:"zemd/json/setup",plugins:{json:n}},{name:"zemd/json/files",files:r,language:"json/json",rules:{...n.configs.recommended.rules}},{name:"zemd/jsonc/files",files:e,language:"json/jsonc",languageOptions:i,rules:{...n.configs.recommended.rules}},{name:"zemd/json5/files",files:s,language:"json/json5",rules:{...n.configs.recommended.rules}}]}o(p,"json");var m=p;import*as u from"eslint-plugin-regexp";export*from"@zemd/eslint-common";function F({ecmaVersion:r=2022,sourceType:e="module",files:s=[z],...i}={}){return[S({name:"zemd/gitignore/ignores"}),{name:"zemd/javascript/files",languageOptions:{sourceType:"commonjs"},files:["eslint.config.js"]},{name:"zemd/javascript/setup",languageOptions:{ecmaVersion:r,globals:{...c.browser,...c.es2021,...c.node,document:"readonly",navigator:"readonly",window:"readonly",...i.globals},sourceType:e}},{name:"zemd/javascript/rules",files:s,plugins:{...a.plugins,...t.plugins,sonarjs:f,"@eslint-community/eslint-comments":d,regexp:u.configs["flat/recommended"].plugins.regexp},rules:{...a.rules,...t.rules,...f.configs.recommended.rules,"sonarjs/no-clear-text-protocols":["off"],"sonarjs/no-useless-intersection":["off"],"sonarjs/todo-tag":["off"],...d.configs.recommended.rules,...u.configs["flat/recommended"].rules}}]}o(F,"javascript");function _(...r){return[...F(...r),...m()]}o(_,"default");export{_ as default,F as javascript,p as json};
|