11'use strict' ;
2+
23module . exports = {
3- extends : [ 'ash-nazg/sauron-node' ] ,
4- parserOptions : {
5- ecmaVersion : 2020 ,
6- sourceType : 'module'
7- } ,
4+ extends : [ 'ash-nazg/sauron-node-overrides' ] ,
85 settings : {
96 polyfills : [
107 'Array.isArray' ,
@@ -21,21 +18,15 @@ module.exports = {
2118 ]
2219 } ,
2320 overrides : [
24- {
25- files : [ '.eslintrc.js' , '.mocharc.js' ] ,
26- extends : [ 'plugin:node/recommended-script' ] ,
27- rules : {
28- 'import/no-commonjs' : 'off' ,
29- 'import/ambiguous' : 'off'
30- }
31- } ,
3221 {
3322 files : [ 'src/jsonpath-node.js' , 'test-helpers/node-env.js' ] ,
34- // Apparent bug with `overrides` necessitating this
35- globals : {
36- require : 'readonly' ,
37- run : 'readonly' ,
38- module : 'readonly'
23+ env : {
24+ mocha : true
25+ } ,
26+ // ESLint doesn't seem to remember this
27+ parserOptions : {
28+ ecmaVersion : 2020 ,
29+ sourceType : 'module'
3930 } ,
4031 rules : {
4132 'node/no-unsupported-features/es-syntax' : [ 'error' , {
@@ -46,13 +37,16 @@ module.exports = {
4637 }
4738 } ,
4839 {
49- files : [ '*.md' ] ,
40+ files : [ '*.md/*.js' , '*.md/*.html '] ,
5041 rules : {
5142 'import/unambiguous' : 0 ,
5243 'import/no-commonjs' : 0 ,
5344 'import/no-unresolved' : [ 'error' , {
5445 ignore : [ 'jsonpath-plus' ]
5546 } ] ,
47+ 'no-multiple-empty-lines' : [ 'error' , {
48+ max : 1 , maxEOF : 2 , maxBOF : 2
49+ } ] ,
5650 'no-undef' : 0 ,
5751 'no-unused-vars' : [ 'error' , {
5852 varsIgnorePattern : 'json|result'
@@ -64,9 +58,12 @@ module.exports = {
6458 'node/no-missing-require' : [ 'error' , {
6559 allowModules : [ 'jsonpath-plus' ]
6660 } ] ,
67- 'node/no-missing-import' : [ 'error' , {
68- allowModules : [ 'jsonpath-plus' ]
69- } ]
61+ // Unfortunately, with the new processor approach, the filename
62+ // is now README.md so our paths must be `../`. However, even
63+ // with that, eslint-plugin-node is not friendly to such
64+ // imports, so we disable
65+ 'node/no-missing-import' : 'off' ,
66+ 'node/no-unpublished-import' : 'off'
7067 }
7168 } ,
7269 {
0 commit comments