Skip to content

Commit

Permalink
Fold the eslint setup for the documentation into the main .eslintrc
Browse files Browse the repository at this point in the history
Made possible by eslint 7.0.0 because of eslint/eslint#12677
  • Loading branch information
papandreou committed May 9, 2020
1 parent a0538b0 commit c30434e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
18 changes: 17 additions & 1 deletion .eslintrc
Expand Up @@ -20,5 +20,21 @@
"mocha/no-exclusive-tests": "error",
"mocha/no-nested-tests": "error",
"mocha/no-identical-title": "error"
}
},
"overrides": [
{
"files": ["documentation/**/*.md"],
"plugins": ["markdown"],
"rules": {
// Some snippets reference variables from previous ones
// but eslint-plugin-markdown lints them independently.
// Disable the rules that this causes trouble with:
"no-unused-vars": 0,
"no-undef": 0
},
"parserOptions": {
"sourceType": "script" // Otherwise globalReturn won't work, we use that for the async snippets
}
}
]
}
14 changes: 0 additions & 14 deletions documentation/.eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"prepare": "make build/lib",
"test": "make test && make test-chrome-headless",
"lint": "eslint . && eslint --ext md documentation && prettier --check '**/*.{js,md}'",
"lint": "eslint . && prettier --check '**/*.{js,md}'",
"generate-site": "generate-site --require ./bootstrap-unexpected-markdown.js",
"update-examples": "generate-site --require ./bootstrap-unexpected-markdown.js --update-examples",
"version": "(test -n \"${IS_MAKE_RELEASE}\" || (echo Please run make release instead && exit 1)) && offline-github-changelog --next=${npm_package_version} > CHANGELOG.md && git add CHANGELOG.md"
Expand Down

0 comments on commit c30434e

Please sign in to comment.