@newsteam/eslint-config 1.2.15 → 1.2.17
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.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -52
- package/dist/plugins/sort-react-dependency-arrays.d.ts +3 -2
- package/dist/plugins/sort-react-dependency-arrays.d.ts.map +1 -1
- package/dist/plugins/sort-react-dependency-arrays.js +95 -18
- package/dist/rules/array-function.d.ts +3 -0
- package/dist/rules/array-function.d.ts.map +1 -0
- package/dist/rules/array-function.js +56 -0
- package/dist/rules/css-modules.d.ts +3 -0
- package/dist/rules/css-modules.d.ts.map +1 -0
- package/dist/rules/css-modules.js +27 -0
- package/dist/rules/destructuring.d.ts +3 -0
- package/dist/rules/destructuring.d.ts.map +1 -0
- package/dist/rules/destructuring.js +39 -0
- package/dist/rules/eslint-comments.d.ts +3 -0
- package/dist/rules/eslint-comments.d.ts.map +1 -0
- package/dist/rules/eslint-comments.js +77 -0
- package/dist/rules/import-newlines.d.ts +3 -0
- package/dist/rules/import-newlines.d.ts.map +1 -0
- package/dist/rules/import-newlines.js +26 -0
- package/dist/rules/import-x.d.ts +3 -0
- package/dist/rules/import-x.d.ts.map +1 -0
- package/dist/rules/import-x.js +420 -0
- package/dist/{rules.d.ts → rules/index.d.ts} +1 -1
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/{rules.js → rules/index.js} +51 -1
- package/dist/rules/next.d.ts +3 -0
- package/dist/rules/next.d.ts.map +1 -0
- package/dist/rules/next.js +140 -0
- package/dist/rules/no-unsanitized.d.ts +3 -0
- package/dist/rules/no-unsanitized.d.ts.map +1 -0
- package/dist/rules/no-unsanitized.js +38 -0
- package/dist/rules/no-useless-assign.d.ts +3 -0
- package/dist/rules/no-useless-assign.d.ts.map +1 -0
- package/dist/rules/no-useless-assign.js +20 -0
- package/dist/rules/node.d.ts +3 -0
- package/dist/rules/node.d.ts.map +1 -0
- package/dist/rules/node.js +305 -0
- package/dist/rules/perfectionist.d.ts +3 -0
- package/dist/rules/perfectionist.d.ts.map +1 -0
- package/dist/rules/perfectionist.js +94 -0
- package/dist/rules/promise.d.ts +3 -0
- package/dist/rules/promise.d.ts.map +1 -0
- package/dist/rules/promise.js +123 -0
- package/dist/rules/react-19-upgrade.d.ts +3 -0
- package/dist/rules/react-19-upgrade.d.ts.map +1 -0
- package/dist/rules/react-19-upgrade.js +20 -0
- package/dist/rules/react-compiler.d.ts +3 -0
- package/dist/rules/react-compiler.d.ts.map +1 -0
- package/dist/{plugins → rules}/react-compiler.js +7 -9
- package/dist/rules/react-hooks.d.ts +3 -0
- package/dist/rules/react-hooks.d.ts.map +1 -0
- package/dist/rules/react-hooks.js +163 -0
- package/dist/rules/react-perf.d.ts +3 -0
- package/dist/rules/react-perf.d.ts.map +1 -0
- package/dist/rules/react-perf.js +47 -0
- package/dist/rules/react-refresh.d.ts +3 -0
- package/dist/rules/react-refresh.d.ts.map +1 -0
- package/dist/rules/react-refresh.js +19 -0
- package/dist/rules/react.d.ts +3 -0
- package/dist/rules/react.d.ts.map +1 -0
- package/dist/rules/react.js +740 -0
- package/dist/rules/security.d.ts +3 -0
- package/dist/rules/security.d.ts.map +1 -0
- package/dist/rules/security.js +112 -0
- package/dist/rules/sort-react-dependency-arrays.d.ts +3 -0
- package/dist/rules/sort-react-dependency-arrays.d.ts.map +1 -0
- package/dist/rules/sort-react-dependency-arrays.js +12 -0
- package/dist/rules/stylistic.d.ts +3 -0
- package/dist/rules/stylistic.d.ts.map +1 -0
- package/dist/rules/stylistic.js +916 -0
- package/dist/rules/typescript.d.ts +3 -0
- package/dist/rules/typescript.d.ts.map +1 -0
- package/dist/{plugins → rules}/typescript.js +2 -1
- package/dist/rules/unicorn.d.ts +3 -0
- package/dist/rules/unicorn.d.ts.map +1 -0
- package/dist/rules/unicorn.js +998 -0
- package/dist/test/index.d.ts +2 -0
- package/dist/test/index.d.ts.map +1 -0
- package/dist/test/index.js +15 -0
- package/package.json +11 -13
- package/dist/plugins/array-function.d.ts +0 -3
- package/dist/plugins/array-function.d.ts.map +0 -1
- package/dist/plugins/array-function.js +0 -58
- package/dist/plugins/css-modules.d.ts +0 -3
- package/dist/plugins/css-modules.d.ts.map +0 -1
- package/dist/plugins/css-modules.js +0 -19
- package/dist/plugins/destructuring.d.ts +0 -3
- package/dist/plugins/destructuring.d.ts.map +0 -1
- package/dist/plugins/destructuring.js +0 -41
- package/dist/plugins/eslint-comments.d.ts +0 -3
- package/dist/plugins/eslint-comments.d.ts.map +0 -1
- package/dist/plugins/eslint-comments.js +0 -79
- package/dist/plugins/import-newlines.d.ts +0 -3
- package/dist/plugins/import-newlines.d.ts.map +0 -1
- package/dist/plugins/import-newlines.js +0 -28
- package/dist/plugins/import-x.d.ts +0 -3
- package/dist/plugins/import-x.d.ts.map +0 -1
- package/dist/plugins/import-x.js +0 -418
- package/dist/plugins/newline-destructuring.d.ts +0 -3
- package/dist/plugins/newline-destructuring.d.ts.map +0 -1
- package/dist/plugins/newline-destructuring.js +0 -26
- package/dist/plugins/next.d.ts +0 -3
- package/dist/plugins/next.d.ts.map +0 -1
- package/dist/plugins/next.js +0 -142
- package/dist/plugins/no-unsanitized.d.ts +0 -3
- package/dist/plugins/no-unsanitized.d.ts.map +0 -1
- package/dist/plugins/no-unsanitized.js +0 -40
- package/dist/plugins/no-useless-assign.d.ts +0 -3
- package/dist/plugins/no-useless-assign.d.ts.map +0 -1
- package/dist/plugins/no-useless-assign.js +0 -22
- package/dist/plugins/node.d.ts +0 -3
- package/dist/plugins/node.d.ts.map +0 -1
- package/dist/plugins/node.js +0 -307
- package/dist/plugins/perfectionist.d.ts +0 -3
- package/dist/plugins/perfectionist.d.ts.map +0 -1
- package/dist/plugins/perfectionist.js +0 -96
- package/dist/plugins/promise.d.ts +0 -3
- package/dist/plugins/promise.d.ts.map +0 -1
- package/dist/plugins/promise.js +0 -125
- package/dist/plugins/react-19-upgrade.d.ts +0 -3
- package/dist/plugins/react-19-upgrade.d.ts.map +0 -1
- package/dist/plugins/react-19-upgrade.js +0 -22
- package/dist/plugins/react-compiler.d.ts +0 -3
- package/dist/plugins/react-compiler.d.ts.map +0 -1
- package/dist/plugins/react-hooks.d.ts +0 -3
- package/dist/plugins/react-hooks.d.ts.map +0 -1
- package/dist/plugins/react-hooks.js +0 -165
- package/dist/plugins/react-perf.d.ts +0 -3
- package/dist/plugins/react-perf.d.ts.map +0 -1
- package/dist/plugins/react-perf.js +0 -49
- package/dist/plugins/react-refresh.d.ts +0 -3
- package/dist/plugins/react-refresh.d.ts.map +0 -1
- package/dist/plugins/react-refresh.js +0 -21
- package/dist/plugins/react.d.ts +0 -3
- package/dist/plugins/react.d.ts.map +0 -1
- package/dist/plugins/react.js +0 -738
- package/dist/plugins/security.d.ts +0 -3
- package/dist/plugins/security.d.ts.map +0 -1
- package/dist/plugins/security.js +0 -114
- package/dist/plugins/stylistic.d.ts +0 -3
- package/dist/plugins/stylistic.d.ts.map +0 -1
- package/dist/plugins/stylistic.js +0 -901
- package/dist/plugins/typescript.d.ts +0 -3
- package/dist/plugins/typescript.d.ts.map +0 -1
- package/dist/plugins/unicorn.d.ts +0 -3
- package/dist/plugins/unicorn.d.ts.map +0 -1
- package/dist/plugins/unicorn.js +0 -994
- package/dist/rules.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/rules/security.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQrC,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAwHzC,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import security from "eslint-plugin-security";
|
|
2
|
+
/*
|
|
3
|
+
* ESLint rules for Node Security
|
|
4
|
+
*
|
|
5
|
+
* https://github.com/nodesecurity/eslint-plugin-security
|
|
6
|
+
*/
|
|
7
|
+
export const securityPluginConfig = {
|
|
8
|
+
plugins: {
|
|
9
|
+
security,
|
|
10
|
+
},
|
|
11
|
+
rules: {
|
|
12
|
+
/*
|
|
13
|
+
* Detects trojan source attacks that employ unicode bidi attacks to inject malicious code.
|
|
14
|
+
*/
|
|
15
|
+
"security/detect-bidi-characters": "warn",
|
|
16
|
+
/*
|
|
17
|
+
* Detects calls to buffer with noAssert flag set
|
|
18
|
+
*
|
|
19
|
+
* From the Node.js API docs: "Setting noAssert to true skips validation
|
|
20
|
+
* of the offset. This allows the offset to be beyond the end of the Buffer."
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
"security/detect-buffer-noassert": "warn",
|
|
24
|
+
/*
|
|
25
|
+
* Detects instances of child_process & non-literal exec()
|
|
26
|
+
*
|
|
27
|
+
* https://blog.liftsecurity.io/2014/08/19/Avoid-Command-Injection-Node.js
|
|
28
|
+
*/
|
|
29
|
+
"security/detect-child-process": "warn",
|
|
30
|
+
/*
|
|
31
|
+
* Detects object.escapeMarkup = false, which can be used with some
|
|
32
|
+
* template engines to disable escaping of HTML entities. This can lead
|
|
33
|
+
* to Cross-Site Scripting (XSS) vulnerabilities.
|
|
34
|
+
*
|
|
35
|
+
* https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)
|
|
36
|
+
*/
|
|
37
|
+
"security/detect-disable-mustache-escape": "warn",
|
|
38
|
+
/*
|
|
39
|
+
* Detects eval(variable) which can allow an attacker to run arbitary
|
|
40
|
+
* code inside your process.
|
|
41
|
+
*
|
|
42
|
+
* http://security.stackexchange.com/questions/94017/what-are-the-security-issues-with-eval-in-javascript
|
|
43
|
+
*/
|
|
44
|
+
"security/detect-eval-with-expression": "warn",
|
|
45
|
+
/*
|
|
46
|
+
* Detects instances of new Buffer(argument) where argument is any non
|
|
47
|
+
* literal value.
|
|
48
|
+
*
|
|
49
|
+
* There wasn't any documentation on https://github.com/nodesecurity/eslint-plugin-security
|
|
50
|
+
* at the time of writing
|
|
51
|
+
*/
|
|
52
|
+
"security/detect-new-buffer": "warn",
|
|
53
|
+
/*
|
|
54
|
+
* Detects Express csrf middleware setup before method-override
|
|
55
|
+
* middleware. This can allow GET requests (which are not checked by csrf)
|
|
56
|
+
* to turn into POST requests later.
|
|
57
|
+
*
|
|
58
|
+
* https://blog.liftsecurity.io/2013/09/07/bypass-connect-csrf-protection-by-abusing
|
|
59
|
+
*/
|
|
60
|
+
"security/detect-no-csrf-before-method-override": "warn",
|
|
61
|
+
/*
|
|
62
|
+
* Detects variable in filename argument of fs calls, which might allow
|
|
63
|
+
* an attacker to access anything on your system.
|
|
64
|
+
*
|
|
65
|
+
* https://www.owasp.org/index.php/Path_Traversal
|
|
66
|
+
*/
|
|
67
|
+
"security/detect-non-literal-fs-filename": "warn",
|
|
68
|
+
/*
|
|
69
|
+
* Detects RegExp(variable), which might allow an attacker to DOS your
|
|
70
|
+
* server with a long-running regular expression.
|
|
71
|
+
*
|
|
72
|
+
* https://blog.liftsecurity.io/2014/11/03/regular-expression-dos-and-node.js
|
|
73
|
+
*/
|
|
74
|
+
"security/detect-non-literal-regexp": "warn",
|
|
75
|
+
/*
|
|
76
|
+
* Detects require(variable), which might allow an attacker to load and
|
|
77
|
+
* run arbitrary code, or access arbitrary files on disk.
|
|
78
|
+
*
|
|
79
|
+
* http://www.bennadel.com/blog/2169-where-does-node-js-and-require-look-for-modules.htm
|
|
80
|
+
*/
|
|
81
|
+
"security/detect-non-literal-require": "warn",
|
|
82
|
+
/*
|
|
83
|
+
* Detects variable[key] as a left- or right-hand assignment operand.
|
|
84
|
+
*
|
|
85
|
+
* Turning this off for now because we like variable[key] too much
|
|
86
|
+
*
|
|
87
|
+
* https://blog.liftsecurity.io/2015/01/14/the-dangers-of-square-bracket-notation/
|
|
88
|
+
*/
|
|
89
|
+
"security/detect-object-injection": "off",
|
|
90
|
+
/*
|
|
91
|
+
* Detects insecure comparisons (==, !=, !== and ===), which check input
|
|
92
|
+
* sequentially.
|
|
93
|
+
*
|
|
94
|
+
* https://snyk.io/blog/node-js-timing-attack-ccc-ctf/
|
|
95
|
+
*/
|
|
96
|
+
"security/detect-possible-timing-attacks": "warn",
|
|
97
|
+
/*
|
|
98
|
+
* Detects if pseudoRandomBytes() is in use, which might not give you
|
|
99
|
+
* the randomness you need and expect.
|
|
100
|
+
*
|
|
101
|
+
* http://stackoverflow.com/questions/18130254/randombytes-vs-pseudorandombytes
|
|
102
|
+
*/
|
|
103
|
+
"security/detect-pseudoRandomBytes": "warn",
|
|
104
|
+
/*
|
|
105
|
+
* Locates potentially unsafe regular expressions, which may take a very
|
|
106
|
+
* long time to run, blocking the event loop.
|
|
107
|
+
*
|
|
108
|
+
* https://blog.liftsecurity.io/2014/11/03/regular-expression-dos-and-node.js
|
|
109
|
+
*/
|
|
110
|
+
"security/detect-unsafe-regex": "warn",
|
|
111
|
+
},
|
|
112
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sort-react-dependency-arrays.d.ts","sourceRoot":"","sources":["../../src/rules/sort-react-dependency-arrays.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKrC,eAAO,MAAM,oCAAoC,EAAE,MAAM,CAAC,MAOzD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import sortReactDependencyArrays from "../plugins/sort-react-dependency-arrays.js";
|
|
2
|
+
/*
|
|
3
|
+
* Sorts react dependency arrays alphabetically.
|
|
4
|
+
*/
|
|
5
|
+
export const sortReactDependenyArraysPluginConfig = {
|
|
6
|
+
plugins: {
|
|
7
|
+
"sort-react-dependency-arrays": sortReactDependencyArrays,
|
|
8
|
+
},
|
|
9
|
+
rules: {
|
|
10
|
+
"sort-react-dependency-arrays/sort": "warn",
|
|
11
|
+
},
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stylistic.d.ts","sourceRoot":"","sources":["../../src/rules/stylistic.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAER,MAAM,EACT,MAAM,QAAQ,CAAC;AAQhB,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MA6+B1C,CAAC"}
|