Browse Source

eslint: config cleanup & drop nested configs

pull/979/head
Vitaly Puzrin 1 year ago
parent
commit
3c66f25608
  1. 15
      .eslintrc.yml
  2. 5
      lib/.eslintrc.yml
  3. 2
      package.json
  4. 2
      test/.eslintrc.yml

15
.eslintrc.yml

@ -1,19 +1,16 @@
extends: standard extends: standard
env:
es6: true
node: true
parserOptions:
ecmaVersion: 2022
overrides: overrides:
- -
files: [ '*.mjs' ] files: [ '*.mjs' ]
parserOptions:
sourceType: module
rules: rules:
no-restricted-globals: [ 2, require, __dirname ] no-restricted-globals: [ 2, require, __dirname ]
-
files: [ 'test/**' ]
env: { mocha: true }
-
files: [ 'lib/**' ]
parserOptions: { ecmaVersion: 2015 }
ignorePatterns: ignorePatterns:
- demo/ - demo/

5
lib/.eslintrc.yml

@ -1,5 +0,0 @@
env:
node: false
parserOptions:
ecmaVersion: 2015

2
package.json

@ -27,7 +27,7 @@
"markdown-it": "bin/markdown-it.mjs" "markdown-it": "bin/markdown-it.mjs"
}, },
"scripts": { "scripts": {
"lint": "eslint --ext js --ext mjs .", "lint": "eslint .",
"test": "npm run lint && CJS_ONLY=1 npm run build && c8 --exclude dist --exclude test -r text -r html -r lcov mocha && node support/specsplit.mjs", "test": "npm run lint && CJS_ONLY=1 npm run build && c8 --exclude dist --exclude test -r text -r html -r lcov mocha && node support/specsplit.mjs",
"doc": "node support/build_doc.mjs", "doc": "node support/build_doc.mjs",
"gh-doc": "npm run doc && gh-pages -d apidoc -f", "gh-doc": "npm run doc && gh-pages -d apidoc -f",

2
test/.eslintrc.yml

@ -1,2 +0,0 @@
env:
mocha: true
Loading…
Cancel
Save