Skip to content

Commit

Permalink
chore: Make ESLint config more standard (#410)
Browse files Browse the repository at this point in the history
* chore: Make ESLint config more standard

* Remove ESLint dep to align with Ember

* Allow ember-cli

* Update .eslintrc.js
  • Loading branch information
RobbieTheWagner authored Nov 16, 2019
1 parent 63b107c commit d2eeda8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 255 deletions.
14 changes: 6 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,16 @@ module.exports = {
env: {
es6: true,
qunit: true,
node: true,
node: true
},
globals: {
// Electron
'requireNode': true,
'processNode': true
},
rules: {
'ember/no-const-outside-module-scope': 'off',
'ember/no-direct-property-access': 'off',
'ember/avoid-leaking-state-in-ember-objects': 'warn', // TODO: Remove after upgrading eslint >= 4.2.0
'ember/no-jquery': 'error',
'ember/require-access-in-comments': 'off',
'newline-before-return': 'error',
'no-console': 'off',
'one-var': 'off',
'no-console': 'off'
},
overrides: [
// node files
Expand All @@ -46,6 +40,7 @@ module.exports = {
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'lib/commands/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
Expand All @@ -65,6 +60,9 @@ module.exports = {
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
'ember/avoid-leaking-state-in-ember-objects': 'off',
'node/no-unpublished-require': ['error', {
'allowModules': ['ember-cli']
}]
})
}
]
Expand Down
1 change: 0 additions & 1 deletion lib/models/assembler.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable ember-suave/prefer-destructuring, newline-before-return, arrow-parens */
'use strict';
const exit = require('capture-exit');
exit.captureExit();
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,7 @@
"ember-source": "~3.14.1",
"ember-source-channel-url": "^2.0.1",
"ember-try": "^1.2.1",
"eslint": "^4.18.2",
"eslint-config-ember": "^0.3.0",
"eslint-plugin-ember": "^7.1.0",
"eslint-plugin-ember-suave": "^1.0.0",
"eslint-plugin-ember": "^7.5.0",
"eslint-plugin-node": "^10.0.0",
"loader.js": "^4.7.0",
"mocha": "^3.5.3",
Expand Down
Loading

0 comments on commit d2eeda8

Please sign in to comment.