File tree 4 files changed +98
-4
lines changed
4 files changed +98
-4
lines changed Original file line number Diff line number Diff line change 37
37
"require" : " ./dist/presets/node-gallium.cjs" ,
38
38
"default" : " ./dist/presets/node-gallium.cjs"
39
39
},
40
+ "./node-hydrogen" : {
41
+ "types" : " ./dist/presets/node-hydrogen.d.ts" ,
42
+ "import" : " ./dist/presets/node-hydrogen.mjs" ,
43
+ "require" : " ./dist/presets/node-hydrogen.cjs" ,
44
+ "default" : " ./dist/presets/node-hydrogen.cjs"
45
+ },
46
+ "./node-iron" : {
47
+ "types" : " ./dist/presets/node-iron.d.ts" ,
48
+ "import" : " ./dist/presets/node-iron.mjs" ,
49
+ "require" : " ./dist/presets/node-iron.cjs" ,
50
+ "default" : " ./dist/presets/node-iron.cjs"
51
+ },
40
52
"./rules" : {
41
53
"types" : " ./dist/rules/index.d.ts" ,
42
54
"import" : " ./dist/rules/index.mjs" ,
Original file line number Diff line number Diff line change @@ -38,7 +38,3 @@ const config: Linter.Config = {
38
38
} ;
39
39
40
40
export default config ;
41
-
42
- // TODO: Create presets for different versions of node
43
- // 18.x Hydrogen 2023-09-18
44
- // 20.x - 2023-09-28
Original file line number Diff line number Diff line change
1
+ import { Linter } from 'eslint' ;
2
+
3
+ import { baseRules , getImportRules , getNodeRules } from '~/rules' ;
4
+
5
+ /**
6
+ * Config for Node.js 16 (Gallium).
7
+ */
8
+ const config : Linter . Config = {
9
+ overrides : [
10
+ {
11
+ files : [ '*.js' , '*.mjs' , '*.cjs' ] ,
12
+ parserOptions : {
13
+ ecmaVersion : 'latest' ,
14
+ } ,
15
+ extends : [
16
+ //
17
+ 'eslint:recommended' ,
18
+ 'plugin:node/recommended' ,
19
+ 'plugin:import/recommended' ,
20
+ 'plugin:unicorn/recommended' ,
21
+ 'prettier' ,
22
+ ] ,
23
+ plugins : [
24
+ //
25
+ 'node' ,
26
+ 'import' ,
27
+ 'unicorn' ,
28
+ ] ,
29
+ rules : {
30
+ ...baseRules ,
31
+ ...getImportRules ( {
32
+ pathsGroups : [
33
+ { group : 'internal' , pattern : '@/**' } ,
34
+ { group : 'internal' , pattern : '~/**' } ,
35
+ ] ,
36
+ } ) ,
37
+ ...getNodeRules ( { nodeVersionRange : '^18.0.0' } ) ,
38
+ } ,
39
+ } ,
40
+ ] ,
41
+ } ;
42
+
43
+ export default config ;
Original file line number Diff line number Diff line change
1
+ import { Linter } from 'eslint' ;
2
+
3
+ import { baseRules , getImportRules , getNodeRules } from '~/rules' ;
4
+
5
+ /**
6
+ * Config for Node.js 16 (Gallium).
7
+ */
8
+ const config : Linter . Config = {
9
+ overrides : [
10
+ {
11
+ files : [ '*.js' , '*.mjs' , '*.cjs' ] ,
12
+ parserOptions : {
13
+ ecmaVersion : 'latest' ,
14
+ } ,
15
+ extends : [
16
+ //
17
+ 'eslint:recommended' ,
18
+ 'plugin:node/recommended' ,
19
+ 'plugin:import/recommended' ,
20
+ 'plugin:unicorn/recommended' ,
21
+ 'prettier' ,
22
+ ] ,
23
+ plugins : [
24
+ //
25
+ 'node' ,
26
+ 'import' ,
27
+ 'unicorn' ,
28
+ ] ,
29
+ rules : {
30
+ ...baseRules ,
31
+ ...getImportRules ( {
32
+ pathsGroups : [
33
+ { group : 'internal' , pattern : '@/**' } ,
34
+ { group : 'internal' , pattern : '~/**' } ,
35
+ ] ,
36
+ } ) ,
37
+ ...getNodeRules ( { nodeVersionRange : '^20.0.0' } ) ,
38
+ } ,
39
+ } ,
40
+ ] ,
41
+ } ;
42
+
43
+ export default config ;
You can’t perform that action at this time.
0 commit comments