eslint-config-reverentgeek 6.0.0 → 6.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/README.md +17 -9
- package/common.js +1 -0
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- markdownlint-disable MD010 -->
|
|
2
2
|
# eslint-config-reverentgeek
|
|
3
3
|
|
|
4
|
-
This package is [ReverentGeek's](https://
|
|
4
|
+
This package is [ReverentGeek's](https://reverentgeek.com/about/) preferred configuration settings for [eslint](https://eslint.org/).
|
|
5
5
|
|
|
6
6
|
## Usage (eslint >= v9.0)
|
|
7
7
|
|
|
@@ -17,7 +17,9 @@ This package is [ReverentGeek's](https://twitter.com/reverentgeek) preferred con
|
|
|
17
17
|
```js
|
|
18
18
|
"use strict";
|
|
19
19
|
|
|
20
|
+
/* eslint-disable-next-line n/no-unpublished-require */
|
|
20
21
|
const rgConfig = require( "eslint-config-reverentgeek" );
|
|
22
|
+
|
|
21
23
|
module.exports = [
|
|
22
24
|
rgConfig.configs.common,
|
|
23
25
|
{
|
|
@@ -32,13 +34,13 @@ module.exports = [
|
|
|
32
34
|
The _node-esm_ config adds specific support for Node.js and ES modules (`import`/`export`).
|
|
33
35
|
|
|
34
36
|
```js
|
|
37
|
+
/* eslint-disable-next-line n/no-unpublished-import */
|
|
35
38
|
import rg from "eslint-config-reverentgeek";
|
|
36
39
|
|
|
37
40
|
export default [
|
|
38
41
|
rg.configs["node-esm"],
|
|
39
42
|
{
|
|
40
43
|
rules: {
|
|
41
|
-
"n/no-unpublished-import": [ "error", { allowModules: [ "eslint-config-reverentgeek" ] } ]
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
];
|
|
@@ -49,7 +51,9 @@ The _blog_ config changes the code style to two-spaced indentions, which is bett
|
|
|
49
51
|
```js
|
|
50
52
|
"use strict";
|
|
51
53
|
|
|
54
|
+
/* eslint-disable-next-line n/no-unpublished-require */
|
|
52
55
|
const rgConfig = require( "eslint-config-reverentgeek" );
|
|
56
|
+
|
|
53
57
|
module.exports = [
|
|
54
58
|
rgConfig.configs.browser,
|
|
55
59
|
rgConfig.configs.blog,
|
|
@@ -65,12 +69,13 @@ The _node_ config adds specific support for Node.js and CommonJS modules.
|
|
|
65
69
|
```js
|
|
66
70
|
"use strict";
|
|
67
71
|
|
|
72
|
+
/* eslint-disable-next-line n/no-unpublished-require */
|
|
68
73
|
const rgConfig = require( "eslint-config-reverentgeek" );
|
|
74
|
+
|
|
69
75
|
module.exports = [
|
|
70
76
|
rgConfig.configs.node,
|
|
71
77
|
{
|
|
72
78
|
rules: {
|
|
73
|
-
"n/no-unpublished-require": [ "error", { allowModules: [ "eslint-config-reverentgeek" ] } ]
|
|
74
79
|
}
|
|
75
80
|
}
|
|
76
81
|
];
|
|
@@ -83,7 +88,9 @@ npm install --save-dev eslint-plugin-react
|
|
|
83
88
|
```
|
|
84
89
|
|
|
85
90
|
```js
|
|
91
|
+
/* eslint-disable-next-line n/no-unpublished-import */
|
|
86
92
|
import rg from "eslint-config-reverentgeek";
|
|
93
|
+
/* eslint-disable-next-line n/no-unpublished-import */
|
|
87
94
|
import react from "eslint-plugin-react";
|
|
88
95
|
|
|
89
96
|
export default [
|
|
@@ -94,7 +101,6 @@ export default [
|
|
|
94
101
|
react,
|
|
95
102
|
},
|
|
96
103
|
rules: {
|
|
97
|
-
"n/no-unpublished-import": [ "error", { allowModules: [ "eslint-config-reverentgeek" ] } ]
|
|
98
104
|
}
|
|
99
105
|
}
|
|
100
106
|
];
|
|
@@ -105,7 +111,9 @@ The _browser_ config sets the `browser` environment and adds ES module support.
|
|
|
105
111
|
```js
|
|
106
112
|
"use strict";
|
|
107
113
|
|
|
114
|
+
/* eslint-disable-next-line n/no-unpublished-require */
|
|
108
115
|
const rgConfig = require( "eslint-config-reverentgeek" );
|
|
116
|
+
|
|
109
117
|
module.exports = [
|
|
110
118
|
rgConfig.configs.browser,
|
|
111
119
|
{
|
|
@@ -128,7 +136,7 @@ module.exports = [
|
|
|
128
136
|
|
|
129
137
|
```js
|
|
130
138
|
module.exports = {
|
|
131
|
-
|
|
139
|
+
extends: [ "reverentgeek" ]
|
|
132
140
|
};
|
|
133
141
|
```
|
|
134
142
|
|
|
@@ -138,7 +146,7 @@ The _blog_ rule set changes to code style to two-spaced indentions, which is bet
|
|
|
138
146
|
|
|
139
147
|
```js
|
|
140
148
|
module.exports = {
|
|
141
|
-
|
|
149
|
+
extends: [ "reverentgeek/blog" ]
|
|
142
150
|
};
|
|
143
151
|
```
|
|
144
152
|
|
|
@@ -148,7 +156,7 @@ The _node_ rule set adds specific support for Node.js and CommonJS modules.
|
|
|
148
156
|
"use strict";
|
|
149
157
|
|
|
150
158
|
module.exports = {
|
|
151
|
-
|
|
159
|
+
extends: [ "reverentgeek/node" ]
|
|
152
160
|
};
|
|
153
161
|
```
|
|
154
162
|
|
|
@@ -158,7 +166,7 @@ The _node/module_ rule set adds specific support for Node.js and ES modules (`im
|
|
|
158
166
|
"use strict";
|
|
159
167
|
|
|
160
168
|
module.exports = {
|
|
161
|
-
|
|
169
|
+
extends: [ "reverentgeek/node/module" ]
|
|
162
170
|
};
|
|
163
171
|
```
|
|
164
172
|
|
|
@@ -166,6 +174,6 @@ The _browser_ rule set the `browser` environment and adds ES module support.
|
|
|
166
174
|
|
|
167
175
|
```js
|
|
168
176
|
module.exports = {
|
|
169
|
-
|
|
177
|
+
extends: [ "reverentgeek/browser" ]
|
|
170
178
|
};
|
|
171
179
|
```
|
package/common.js
CHANGED
|
@@ -10,6 +10,7 @@ const config = {
|
|
|
10
10
|
"no-console": [ "off" ],
|
|
11
11
|
"no-var": [ "error" ],
|
|
12
12
|
"@stylistic/array-bracket-spacing": [ "error", "always", { singleValue: true } ],
|
|
13
|
+
"@stylistic/brace-style": [ "error", "1tbs" ],
|
|
13
14
|
"@stylistic/comma-dangle": [ "error", "never" ],
|
|
14
15
|
"@stylistic/comma-spacing": [ "error", { before: false, after: true } ],
|
|
15
16
|
"@stylistic/eol-last": [ "error", "always" ],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-reverentgeek",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "ESLint rules that ReverentGeek likes :)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -20,10 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@stylistic/eslint-plugin": "^5.2.1",
|
|
22
22
|
"eslint-plugin-n": "^17.7.0",
|
|
23
|
-
"globals": "^16.2.0"
|
|
24
|
-
"mergician": "^2.0.2"
|
|
23
|
+
"globals": "^16.2.0"
|
|
25
24
|
},
|
|
26
25
|
"devDependencies": {
|
|
27
26
|
"eslint": "^9.34.0"
|
|
28
27
|
}
|
|
29
|
-
}
|
|
28
|
+
}
|