Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak linting configuration. #288

Merged
merged 3 commits into from
Dec 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,19 @@ module.exports = {
},
overrides: [
{
files: ['./index.js'],
files: ['index.js'],
excludedFiles: ['addon-test-support/**', 'tests/**'],
parserOptions: {
sourceType: 'script',
},
env: {
browser: false,
node: true,
}
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
}),
},
{
files: ['tests/**/*.js'],
Expand All @@ -34,14 +39,20 @@ module.exports = {
}
},
{
files: ['./index.js', 'addon-test-support/**/*.js', 'config/**/*.js'],
files: ['index.js', 'addon-test-support/**/*.js', 'config/**/*.js'],
plugins: [
'disable-features',
],
rules: {
'disable-features/disable-async-await': 'error',
'disable-features/disable-generator-functions': 'error',
}
}
},
{
files: ['addon-test-support/**/*.js'],
rules: {
'valid-jsdoc': 'warn',
}
},
]
};
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

module.exports = {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"ember-source": "~2.17.0",
"eslint-config-prettier": "^2.6.0",
"eslint-plugin-disable-features": "^0.1.3",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-prettier": "^2.3.1",
"lerna-changelog": "^0.7.0",
"loader.js": "^4.2.3",
Expand Down
15 changes: 14 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2957,6 +2957,15 @@ eslint-plugin-disable-features@^0.1.3:
dependencies:
requireindex "~1.1.0"

eslint-plugin-node@^5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-5.2.1.tgz#80df3253c4d7901045ec87fa660a284e32bdca29"
dependencies:
ignore "^3.3.6"
minimatch "^3.0.4"
resolve "^1.3.3"
semver "5.3.0"

eslint-plugin-prettier@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.3.1.tgz#e7a746c67e716f335274b88295a9ead9f544e44d"
Expand Down Expand Up @@ -4024,7 +4033,7 @@ iferr@^0.1.5:
version "0.1.5"
resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501"

ignore@^3.3.3:
ignore@^3.3.3, ignore@^3.3.6:
version "3.3.7"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021"

Expand Down Expand Up @@ -6616,6 +6625,10 @@ sane@^1.1.1, sane@^1.6.0:
version "5.4.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"

semver@5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"

send@0.16.1:
version "0.16.1"
resolved "https://registry.yarnpkg.com/send/-/send-0.16.1.tgz#a70e1ca21d1382c11d0d9f6231deb281080d7ab3"
Expand Down