11module . exports = {
22 env : {
33 node : true ,
4+ browser : false
45 } ,
56 extends : [
6- 'airbnb-base' ,
7+ 'ash-nazg/sauron-node' ,
8+ // Override ash-nazg's current preference for ESM
9+ 'plugin:node/recommended-script'
710 ] ,
11+ settings : {
12+ jsdoc : {
13+ // For `jsdoc/check-examples` in `ash-nazg`
14+ matchingFileName : 'dummy.md' ,
15+ rejectExampleCodeRegex : '^`' ,
16+ }
17+ } ,
818 overrides : [
919 {
1020 files : [ 'test/**' ] ,
@@ -22,15 +32,84 @@ module.exports = {
2232 // 'jest/prefer-to-have-length': [2],
2333 // 'jest/valid-expect': [2],
2434 }
35+ } ,
36+ {
37+ files : [ '**/*.md' ] ,
38+ rules : {
39+ 'eol-last' : 'off' ,
40+ 'no-console' : 'off' ,
41+ 'no-undef' : 'off' ,
42+ 'no-unused-vars' : 'warn' ,
43+ 'padded-blocks' : 'off' ,
44+ 'import/unambiguous' : 'off' ,
45+ 'import/no-unresolved' : 'off' ,
46+ 'node/no-missing-import' : 'off' ,
47+ 'node/no-missing-require' : 'off' ,
48+ 'func-names' : 'off' ,
49+ 'import/newline-after-import' : 'off' ,
50+ strict : 'off' ,
51+ // Disable until eslint-plugin-jsdoc may fix: https://github.com/gajus/eslint-plugin-jsdoc/issues/211
52+ indent : 'off'
53+ }
2554 }
2655 ] ,
56+ globals : {
57+ // By some ESLint bug, config overrides not working with globals
58+ require : 'readonly' ,
59+ module : 'readonly' ,
60+ exports : 'writable'
61+ } ,
2762 plugins : [
2863 // 'jest'
2964 ] ,
3065 rules : {
3166 'comma-dangle' : 0 ,
3267 'no-underscore-dangle' : 0 ,
3368 'no-param-reassign' : 0 ,
34- 'prefer-destructuring' : 0 ,
69+
70+ // Disable until implementing promises and Node version supporting
71+ 'promise/prefer-await-to-callbacks' : 0 ,
72+ 'promise/prefer-await-to-then' : 0 ,
73+
74+ // Disable until ready to tackle
75+ 'require-jsdoc' : 0 ,
76+
77+ // Disable current preferences of ash-nazg
78+ 'import/no-commonjs' : 0 ,
79+ 'node/exports-style' : 0 ,
80+
81+ // add back different or stricter rules from airbnb
82+ 'object-curly-spacing' : [ 'error' , 'always' ] ,
83+ 'func-names' : 'warn' ,
84+ 'max-len' : [ 'error' , 100 , 2 , {
85+ ignoreUrls : true ,
86+ ignoreComments : false ,
87+ ignoreRegExpLiterals : true ,
88+ ignoreStrings : true ,
89+ ignoreTemplateLiterals : true ,
90+ } ] ,
91+ 'space-before-function-paren' : [ 'error' , {
92+ anonymous : 'always' ,
93+ named : 'never' ,
94+ asyncArrow : 'always'
95+ } ] ,
96+ 'no-multiple-empty-lines' : [ 'error' , { max : 2 , maxEOF : 0 } ] ,
97+ 'arrow-parens' : [ 'error' , 'as-needed' , {
98+ requireForBlockBody : true ,
99+ } ] ,
100+ 'no-empty-function' : [ 'error' , {
101+ allow : [
102+ 'arrowFunctions' ,
103+ 'functions' ,
104+ 'methods' ,
105+ ]
106+ } ] ,
107+ 'no-unused-vars' : [ 'error' , { vars : 'all' , args : 'after-used' , ignoreRestSiblings : true } ] ,
108+ 'no-multi-assign' : [ 'error' ] ,
109+ 'no-unused-expressions' : [ 'error' , {
110+ allowShortCircuit : false ,
111+ allowTernary : false ,
112+ allowTaggedTemplates : false ,
113+ } ]
35114 }
36115 } ;
0 commit comments