@zemd/eslint-js 1.0.15 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -3
package/README.md
CHANGED
@@ -15,6 +15,7 @@ This package includes a set of ESLint configurations for **JavaScript** projects
|
|
15
15
|
| `eslint-plugin-sonarjs` | ESLint plugin maintained by Sonar, designed to help developers write Clean Code | all `recommended` rules minus some disabled for better DX | LGPL-3.0-only |
|
16
16
|
| `@eslint-community/eslint-plugin-eslint-comments` | additional ESLint rules for ESLint directive comments (e.g. //eslint-disable-line) | `recommended` rules | MIT |
|
17
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 |
|
18
19
|
|
19
20
|
## Installation
|
20
21
|
|
package/dist/index.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";var
|
1
|
+
"use strict";var S=Object.create;var u=Object.defineProperty;var q=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=q(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?S(_(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:()=>z,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"},d={plugins:{unicorn:w.default},rules:C};var g=t(require("@eslint/js"),1),L={"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"],"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."}]},b={plugins:{eslint:g.default},rules:{...g.default.configs.recommended.rules,...L}};var v=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 N=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=[v.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 z(...r){return[...k(...r),...N()]}l(z,"default");0&&(module.exports={javascript,json,...require("@zemd/eslint-common")});
|
package/dist/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var
|
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"},t={plugins:{unicorn:y},rules:j};import l from"@eslint/js";var x={"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"],"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."}]},a={plugins:{eslint:l},rules:{...l.configs.recommended.rules,...x}};import{GLOB_SRC as k}from"@zemd/eslint-common";import d from"@eslint-community/eslint-plugin-eslint-comments";import z from"eslint-config-flat-gitignore";import c from"globals";import n from"@eslint/json";import{GLOB_JSONC_VSCODE as h,GLOB_JSON as w,GLOB_JSON5 as N,GLOB_JSONC as v,GLOB_JSONC_TSCONFIG as O}from"@zemd/eslint-common";function p({jsonFiles:r=[w],jsoncFiles:e=[v,O,h],json5Files:s=[N],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 S({ecmaVersion:r=2022,sourceType:e="module",files:s=[k],...i}={}){return[z({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(S,"javascript");function q(...r){return[...S(...r),...m()]}o(q,"default");export{q as default,S as javascript,p as json};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@zemd/eslint-js",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.1.1",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"description": "Shared ESLint config for javascript projects",
|
6
6
|
"keywords": [
|
@@ -21,7 +21,8 @@
|
|
21
21
|
"homepage": "https://github.com/zemd/eslint-flat-config",
|
22
22
|
"repository": {
|
23
23
|
"type": "git",
|
24
|
-
"url": "git+https://github.com/zemd/eslint-flat-config.git"
|
24
|
+
"url": "git+https://github.com/zemd/eslint-flat-config.git",
|
25
|
+
"directory": "packages/js"
|
25
26
|
},
|
26
27
|
"bugs": {
|
27
28
|
"url": "https://github.com/zemd/eslint-flat-config/issues"
|
@@ -48,10 +49,11 @@
|
|
48
49
|
"@eslint/js": "^9.25.1",
|
49
50
|
"@eslint/json": "^0.12.0",
|
50
51
|
"eslint-config-flat-gitignore": "^2.1.0",
|
52
|
+
"eslint-plugin-regexp": "^2.7.0",
|
51
53
|
"eslint-plugin-sonarjs": "^3.0.2",
|
52
54
|
"eslint-plugin-unicorn": "^59.0.0",
|
53
55
|
"globals": "^16.0.0",
|
54
|
-
"@zemd/eslint-common": "1.0.
|
56
|
+
"@zemd/eslint-common": "1.0.4"
|
55
57
|
},
|
56
58
|
"devDependencies": {
|
57
59
|
"@types/eslint": "^9.6.1",
|