Skip to content

Commit

Permalink
fix ESLint problems and consolidate configuration
Browse files Browse the repository at this point in the history
- we weren't being strict enough about disallowing ES6.  even though we
  had `es6: false` in the config, the `parserOptions` were set to use
  `ecmaVersion: 8`.  oops
- linted a couple files
- deleted all `.eslintrc.yml` files except for the root one; use `overrides`
  instead

Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
  • Loading branch information
boneskull committed Apr 18, 2018
1 parent 40d9ea3 commit 5212718
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 26 deletions.
29 changes: 28 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ extends: semistandard
env:
node: yes
browser: yes
es6: no
parserOptions:
ecmaVersion: 5
ecmaFeatures:
globalReturn: no
experimentalObjectRestSpread: no
jsx: no
sourceType: script
rules:
strict:
Expand All @@ -13,3 +17,26 @@ rules:
linebreak-style:
- error
- unix
overrides:
- files:
- scripts/**/*.js
- package-scripts.js
- karma.conf.js
- .wallaby.js
- bin/*
parserOptions:
ecmaVersion: 6
env:
browser: no
- files:
- test/**/*.js
env:
mocha: yes
globals:
expect: no
assert: no
- files:
- doc/**/*.js
env:
node: no

3 changes: 0 additions & 3 deletions bin/.eslintrc.yml

This file was deleted.

3 changes: 0 additions & 3 deletions docs/.eslintrc.yml

This file was deleted.

4 changes: 0 additions & 4 deletions lib/browser/.eslintrc.yml

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/.eslintrc.yml

This file was deleted.

7 changes: 0 additions & 7 deletions test/.eslintrc.yml

This file was deleted.

8 changes: 4 additions & 4 deletions test/reporters/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ function makeExpectedTest (
}

module.exports = {
createMockRunner,
makeTest,
createElements,
makeExpectedTest
createMockRunner: createMockRunner,
makeTest: makeTest,
createElements: createElements,
makeExpectedTest: makeExpectedTest
};
2 changes: 1 addition & 1 deletion test/unit/grep.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('Mocha', function () {
describe('"invert" option', function () {
it('should add a Boolean to the mocha.options object', function () {
var mocha = new Mocha({ invert: true });
expect(mocha.options.invert).to.be.ok;
expect(mocha.options.invert, 'to be', true);
});
});
});

0 comments on commit 5212718

Please sign in to comment.