From 2cd62a2a0b14826d6f5b5c96e89bba8b47ceb07f Mon Sep 17 00:00:00 2001 From: ybiquitous Date: Thu, 7 Dec 2017 09:59:18 +0900 Subject: [PATCH] feat(eslint): add extension `.mjs` for ES modules (#64) --- package.json | 4 ++-- test/init.test.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6b0cce9a..e722d810 100644 --- a/package.json +++ b/package.json @@ -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:*", @@ -70,7 +70,7 @@ "release:dry-run": "standard-version --dry-run" }, "lint-staged": { - "*.{js,jsx}": [ + "*.{js,jsx,mjs}": [ "eslint --fix --no-ignore", "git add" ], diff --git a/test/init.test.js b/test/init.test.js index 3bdcdab9..205396ea 100644 --- a/test/init.test.js +++ b/test/init.test.js @@ -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:*', @@ -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', })