Skip to content

Commit

Permalink
feat(eslint): add extension .mjs for ES modules (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous authored Dec 7, 2017
1 parent 756d7e3 commit 2cd62a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"test": "nyc mocha",
"test:watch": "mocha --watch",
"test:coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx .",
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.mjs .",
"lint:js:fix": "npm run lint:js -- --fix",
"lint:md": "markdownlint *.md",
"lint": "npm-run-all --print-name --print-label --parallel lint:*",
Expand All @@ -70,7 +70,7 @@
"release:dry-run": "standard-version --dry-run"
},
"lint-staged": {
"*.{js,jsx}": [
"*.{js,jsx,mjs}": [
"eslint --fix --no-ignore",
"git add"
],
Expand Down
4 changes: 2 additions & 2 deletions test/init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ suite('init', () => {
assert.deepStrictEqual(pkg.scripts, {
build: 'babel src/ -d lib/',
commitmsg: 'commitlint -e',
'lint:js': 'eslint --ignore-path .gitignore --ext .js,.jsx .',
'lint:js': 'eslint --ignore-path .gitignore --ext .js,.jsx,.mjs .',
'lint:js:fix': 'npm run lint:js -- --fix',
'lint:md': 'markdownlint *.md',
lint: 'npm-run-all --print-name --print-label --parallel lint:*',
Expand All @@ -51,7 +51,7 @@ suite('init', () => {
})

assert.deepStrictEqual(pkg['lint-staged'], {
'*.{js,jsx}': ['eslint --fix --no-ignore', 'git add'],
'*.{js,jsx,mjs}': ['eslint --fix --no-ignore', 'git add'],
'*.md': 'markdownlint',
'*.css': 'xyz',
})
Expand Down

0 comments on commit 2cd62a2

Please sign in to comment.