1- import globals from 'globals' ;
2- import importPlugin from 'eslint-plugin-import' ;
31import js from '@eslint/js' ;
2+ import importPlugin from 'eslint-plugin-import' ;
43import prettier from 'eslint-plugin-prettier' ;
5- import sortImportPlugin from 'eslint-plugin-sort-imports-es6-autofix ' ;
4+ import globals from 'globals ' ;
65
76export default [
87 js . configs . recommended ,
@@ -11,7 +10,6 @@ export default [
1110 name : 'planet/recommended' ,
1211 plugins : {
1312 prettier,
14- 'sort-imports-es6-autofix' : sortImportPlugin ,
1513 } ,
1614
1715 languageOptions : {
@@ -25,41 +23,13 @@ export default [
2523 } ,
2624
2725 rules : {
26+ // core rules
2827 'array-callback-return' : 'error' ,
2928 'block-scoped-var' : 'error' ,
3029 curly : 'error' ,
3130 'default-case' : 'error' ,
32-
33- 'dot-notation' : [
34- 'error' ,
35- {
36- allowPattern : '^[a-z]+(_[a-z]+)+$' ,
37- } ,
38- ] ,
39-
31+ 'dot-notation' : [ 'error' , { allowPattern : '^[a-z]+(_[a-z]+)+$' } ] ,
4032 eqeqeq : 'error' ,
41- 'import/default' : 'error' ,
42-
43- 'import/extensions' : [
44- 'error' ,
45- 'always' ,
46- {
47- ignorePackages : true ,
48- } ,
49- ] ,
50-
51- 'import/first' : 'error' ,
52- 'import/named' : 'error' ,
53- 'import/no-duplicates' : 'error' ,
54- 'import/no-self-import' : 'error' ,
55-
56- 'import/no-unresolved' : [
57- 'error' ,
58- {
59- commonjs : true ,
60- } ,
61- ] ,
62-
6333 'no-case-declarations' : 'error' ,
6434 'no-cond-assign' : 'error' ,
6535 'no-console' : 'error' ,
@@ -94,40 +64,29 @@ export default [
9464 'no-unexpected-multiline' : 'error' ,
9565 'no-unreachable' : 'error' ,
9666 'no-unsafe-finally' : 'error' ,
97-
98- 'no-unused-vars' : [
99- 'error' ,
100- {
101- ignoreRestSiblings : true ,
102- } ,
103- ] ,
104-
67+ 'no-unused-vars' : [ 'error' , { ignoreRestSiblings : true } ] ,
10568 'no-use-before-define' : [ 'error' , 'nofunc' ] ,
10669 'no-var' : 'error' ,
10770 'prefer-const' : 'error' ,
108-
109- 'prettier/prettier' : [
110- 'error' ,
111- {
112- singleQuote : true ,
113- bracketSpacing : false ,
114- arrowParens : 'avoid' ,
115- } ,
116- ] ,
117-
11871 strict : 'off' ,
72+ 'use-isnan' : 'error' ,
73+ 'valid-typeof' : 'error' ,
11974
120- 'sort-imports-es6-autofix/sort-imports-es6' : [
75+ // import plugin
76+ 'import/default' : 'error' ,
77+ 'import/extensions' : [ 'error' , 'always' , { ignorePackages : true } ] ,
78+ 'import/first' : 'error' ,
79+ 'import/named' : 'error' ,
80+ 'import/no-duplicates' : 'error' ,
81+ 'import/no-self-import' : 'error' ,
82+ 'import/no-unresolved' : [ 'error' , { commonjs : true } ] ,
83+ 'import/order' : [ 'error' , { named : true , alphabetize : { order : 'asc' } } ] ,
84+
85+ // prettier plugin
86+ 'prettier/prettier' : [
12187 'error' ,
122- {
123- ignoreCase : false ,
124- ignoreMemberSort : false ,
125- memberSyntaxSortOrder : [ 'none' , 'all' , 'single' , 'multiple' ] ,
126- } ,
88+ { singleQuote : true , bracketSpacing : false , arrowParens : 'avoid' } ,
12789 ] ,
128-
129- 'use-isnan' : 'error' ,
130- 'valid-typeof' : 'error' ,
13190 } ,
13291 } ,
13392] ;
0 commit comments