@zemd/eslint-js 2.0.0 → 2.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/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -16
package/dist/index.mjs
CHANGED
|
@@ -1,2 +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";
|
|
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";const 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`}},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`]},_={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}}]}const y=e(import.meta.url);function b({ecmaVersion:e=2022,sourceType:t=`module`,files:n=[c],...r}={}){let i=m(`eslint-plugin-sonarjs`)?y(`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 x(...e){return[...b(...e),...v()]}export{x as default,b as javascript,v as json};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +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":"sgBAuGA,IAAA,EAPyB,CACvB,QAAS,CACP,UACD,CACD,MA9FuC,CACvC,wBAAyB,QACzB,sBAAuB,QACvB,iCAAkC,QAClC,gCAAiC,QACjC,2CAA4C,QAC5C,2BAA4B,QAC5B,oCAAqC,QACrC,sCAAuC,QACvC,4BAA6B,QAC7B,wCAAyC,QACzC,qCAAsC,QACtC,wBAAyB,QACzB,2CAA4C,QAC5C,wBAAyB,QACzB,6BAA8B,QAC9B,+BAAgC,QAChC,wCAAyC,QACzC,kCAAmC,QACnC,4CAA6C,QAC7C,4BAA6B,QAC7B,iCAAkC,QAClC,4BAA6B,QAC7B,+CAAgD,QAChD,sCAAuC,QACvC,mCAAoC,QACpC,wCAAyC,QACzC,8BAA+B,QAC/B,mCAAoC,QACpC,oCAAqC,QACrC,4BAA6B,QAC7B,gCAAiC,QACjC,4BAA6B,QAC7B,oBAAqB,QACrB,sCAAuC,QACvC,4BAA6B,QAC7B,0BAA2B,QAC3B,iCAAkC,QAClC,kCAAmC,QACnC,iCAAkC,QAClC,8BAA+B,QAC/B,6BAA8B,QAC9B,oCAAqC,QACrC,+CAAgD,QAChD,iCAAkC,QAClC,kCAAmC,QACnC,gCAAiC,QACjC,+BAAgC,QAChC,mCAAoC,QACpC,wCAAyC,QACzC,mCAAoC,QACpC,gCAAiC,QACjC,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d,aAAa,SACb,QAAQ,CAAC,EAAS,CAClB,GAAG,GAC2B,EAAE,CAAwB,CAExD,IAAM,EADc,EAAgB,wBAAwB,CAEvD,EAAQ,wBAAwB,CACjC,IAAA,GAwDJ,MAtDoC,CAClC,EAAU,CACR,KAAM,yBACP,CAAC,CACF,CACE,KAAM,wBACN,gBAAiB,CACf,WAAY,WACb,CACD,MAAO,CAAC,mBAAmB,CAC5B,CACD,CACE,KAAM,wBACN,gBAAiB,CACf,cACA,QAAS,CACP,GAAG,EAAQ,QACX,GAAG,EAAQ,OACX,GAAG,EAAQ,KACX,SAAU,WACV,UAAW,WACX,OAAQ,WACR,GAAG,EAAK,QACT,CACD,aACD,CACF,CACD,CACE,KAAM,wBACN,QACA,QAAS,CACP,GAAGE,EAAO,QACV,GAAGC,EAAQ,QACX,GAAI,EAAU,CAAE,UAAS,CAAG,EAAE,CAC9B,oCAAqC,EACrC,OAAQ,EAAY,QAAQ,oBAAoB,QAAQ,OACzD,CACD,MAAO,CACL,GAAGD,EAAO,MACV,GAAGC,EAAQ,MACX,GAAI,EAAU,EAAQ,QAAQ,YAAY,MAAQ,EAAE,CACpD,GAAI,EACA,CACE,kCAAmC,CAAC,MAAM,CAC1C,kCAAmC,CAAC,MAAM,CAC1C,mBAAoB,CAAC,MAAM,CAC5B,CACD,EAAE,CACN,GAAG,EAAS,QAAQ,YAAY,MAChC,GAAG,EAAY,QAAQ,oBAAoB,MAC5C,CACF,CACF,CAKH,SAAA,EAAyB,GAAG,EAA6D,CACvF,MAAO,CAAC,GAAG,EAAW,GAAG,EAAO,CAAE,GAAGC,GAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["rules","feature","eslint","unicorn"],"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":"sgBAgGA,MAAMC,EAAmB,CACvB,QAAS,CACP,UACD,CACD,MA9FuC,CACvC,wBAAyB,QACzB,sBAAuB,QACvB,iCAAkC,QAClC,gCAAiC,QACjC,2CAA4C,QAC5C,2BAA4B,QAC5B,oCAAqC,QACrC,sCAAuC,QACvC,4BAA6B,QAC7B,wCAAyC,QACzC,qCAAsC,QACtC,wBAAyB,QACzB,2CAA4C,QAC5C,wBAAyB,QACzB,6BAA8B,QAC9B,+BAAgC,QAChC,wCAAyC,QACzC,kCAAmC,QACnC,4CAA6C,QAC7C,4BAA6B,QAC7B,iCAAkC,QAClC,4BAA6B,QAC7B,+CAAgD,QAChD,sCAAuC,QACvC,mCAAoC,QACpC,wCAAyC,QACzC,8BAA+B,QAC/B,mCAAoC,QACpC,oCAAqC,QACrC,4BAA6B,QAC7B,gCAAiC,QACjC,4BAA6B,QAC7B,oBAAqB,QACrB,sCAAuC,QACvC,4BAA6B,QAC7B,0BAA2B,QAC3B,iCAAkC,QAClC,kCAAmC,QACnC,iCAAkC,QAClC,8BAA+B,QAC/B,6BAA8B,QAC9B,oCAAqC,QACrC,+CAAgD,QAChD,iCAAkC,QAClC,kCAAmC,QACnC,gCAAiC,QACjC,+BAAgC,QAChC,mCAAoC,QACpC,wCAAyC,QACzC,mCAAoC,QACpC,gCAAiC,QACjC,+BAAgC,QAChC,6BAA8B,QAC9B,0BAA2B,QAC3B,oCAAqC,QACrC,8BAA+B,QAC/B,yCAA0C,QAC1C,uCAAwC,QACxC,4BAA6B,QAC7B,4BAA6B,QAC7B,kCAAmC,QACnC,8BAA+B,QAC/B,6BAA8B,QAC9B,wCAA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ACf,WAAY,WACb,CACD,MAAO,CAAC,mBAAmB,CAC5B,CACD,CACE,KAAM,wBACN,gBAAiB,CACf,cACA,QAAS,CACP,GAAG,EAAQ,QACX,GAAG,EAAQ,OACX,GAAG,EAAQ,KACX,SAAU,WACV,UAAW,WACX,OAAQ,WACR,GAAG,EAAK,QACT,CACD,aACD,CACF,CACD,CACE,KAAM,wBACN,QACA,QAAS,CACP,GAAGC,EAAO,QACV,GAAGC,EAAQ,QACX,GAAI,EAAU,CAAE,UAAS,CAAG,EAAE,CAC9B,oCAAqC,EACrC,OAAQ,EAAY,QAAQ,oBAAoB,QAAQ,OACzD,CACD,MAAO,CACL,GAAGD,EAAO,MACV,GAAGC,EAAQ,MACX,GAAI,EAAU,EAAQ,QAAQ,YAAY,MAAQ,EAAE,CACpD,GAAI,EACA,CACE,kCAAmC,CAAC,MAAM,CAC1C,kCAAmC,CAAC,MAAM,CAC1C,mBAAoB,CAAC,MAAM,CAC5B,CACD,EAAE,CACN,GAAG,EAAS,QAAQ,YAAY,MAChC,GAAG,EAAY,QAAQ,oBAAoB,MAC5C,CACF,CACF,CAKH,SAAA,EAAyB,GAAG,EAA6D,CACvF,MAAO,CAAC,GAAG,EAAW,GAAG,EAAO,CAAE,GAAG,GAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zemd/eslint-js",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Shared ESLint config for javascript projects",
|
|
6
6
|
"keywords": [
|
|
@@ -40,31 +40,25 @@
|
|
|
40
40
|
"module": "./dist/index.mjs",
|
|
41
41
|
"types": "./dist/index.d.mts",
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"eslint": ">=9.2.0"
|
|
44
|
-
"eslint-plugin-sonarjs": "^3.0.5"
|
|
45
|
-
},
|
|
46
|
-
"peerDependenciesMeta": {
|
|
47
|
-
"eslint-plugin-sonarjs": {
|
|
48
|
-
"optional": true
|
|
49
|
-
}
|
|
43
|
+
"eslint": ">=9.2.0 || >=10.0.0"
|
|
50
44
|
},
|
|
51
45
|
"dependencies": {
|
|
52
46
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
|
|
53
|
-
"@eslint/js": "^
|
|
54
|
-
"@eslint/json": "^0.
|
|
47
|
+
"@eslint/js": "^10.0.1",
|
|
48
|
+
"@eslint/json": "^1.0.0",
|
|
55
49
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
56
|
-
"eslint-plugin-regexp": "^
|
|
50
|
+
"eslint-plugin-regexp": "^3.0.0",
|
|
57
51
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
58
|
-
"globals": "^17.
|
|
52
|
+
"globals": "^17.3.0",
|
|
59
53
|
"local-pkg": "^1.1.2",
|
|
60
|
-
"@zemd/eslint-common": "2.0.
|
|
54
|
+
"@zemd/eslint-common": "2.0.1"
|
|
61
55
|
},
|
|
62
56
|
"devDependencies": {
|
|
63
57
|
"@types/eslint": "^9.6.1",
|
|
64
|
-
"@types/node": "^25.
|
|
58
|
+
"@types/node": "^25.2.2",
|
|
65
59
|
"@zemd/tsconfig": "^1.4.0",
|
|
66
|
-
"eslint": "^
|
|
67
|
-
"tsdown": "^0.20.
|
|
60
|
+
"eslint": "^10.0.0",
|
|
61
|
+
"tsdown": "^0.20.3",
|
|
68
62
|
"typescript": "^5.9.3"
|
|
69
63
|
},
|
|
70
64
|
"scripts": {
|