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

Improve ESLint setup #164

Merged
merged 8 commits into from
Nov 16, 2018
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: 19 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
20 changes: 19 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,19 @@ module.exports = {
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'ember-cli-build.js',
'blueprints/*/index.js',
'config/**/*.js',
'test/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'app/**',
'addon-test-support/**',
'addon/**',
'tests/dummy/app/**'
],
Expand All @@ -39,6 +44,19 @@ module.exports = {
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
},
// node tests
{
files: [
'test/**/*.js',
],
env: {
mocha: true,
},
rules: {
'node/no-unpublished-require': 'off',
'node/no-extraneous-require': 'off'
}
}
]
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/connect.lock
/coverage/*
/libpeerconnection.log
.eslintcache
npm-debug.log*
yarn-error.log
testem.log
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"repository": "https://github.com/ember-cli/ember-fetch",
"scripts": {
"build": "ember build",
"lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests",
"lint:js": "eslint . --cache",
Turbo87 marked this conversation as resolved.
Show resolved Hide resolved
"start": "ember server",
"test": "npm run test:node && ember try:each",
"test:node": "mocha"
Expand All @@ -40,7 +40,6 @@
"co": "^4.6.0",
"ember-cli": "~3.0.2",
"ember-cli-dependency-checker": "^3.0.0",
"ember-cli-eslint": "^4.2.1",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-inject-live-reload": "^2.0.1",
"ember-cli-pretender": "^3.0.0",
Expand All @@ -55,7 +54,8 @@
"ember-source": "~3.0.0",
"ember-source-channel-url": "^1.0.1",
"ember-try": "^1.1.0",
"eslint-plugin-ember": "^5.0.0",
"eslint": "^5.9.0",
"eslint-plugin-ember": "^6.0.1",
"eslint-plugin-node": "^5.2.1",
"loader.js": "^4.2.3",
"mocha": "^5.2.0"
Expand Down
Loading