Skip to content

Commit e9fb466

Browse files
authored
chore: use mjs (#55)
1 parent 1900312 commit e9fb466

31 files changed

+44
-56
lines changed

.c8rc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"include": ["src/**/*.mjs"],
3+
"reporter": ["lcov", "text-summary"]
4+
}

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
},
1010
overrides: [
1111
{
12-
files: ["src/**/*.js", "test/**/*.js"],
12+
files: ["src/**/*.mjs", "test/**/*.mjs"],
1313
extends: ["plugin:@eslint-community/mysticatea/+modules"],
1414
rules: {
1515
"init-declarations": "off",

.nycrc.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

babel.config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,22 @@
3939
"format:prettier": "prettier .",
4040
"format:check": "npm run -s format:prettier -- --check",
4141
"lint": "eslint .",
42-
"test": "nyc mocha --reporter dot \"test/*.js\"",
42+
"test": "c8 mocha --reporter dot \"test/*.mjs\"",
4343
"preversion": "npm test && npm run -s build",
4444
"postversion": "git push && git push --tags",
4545
"prewatch": "npm run -s clean",
46-
"watch": "warun \"{src,test}/**/*.js\" -- npm run -s test:mocha"
46+
"watch": "warun \"{src,test}/**/*.mjs\" -- npm run -s test:mocha"
4747
},
4848
"dependencies": {
4949
"eslint-visitor-keys": "^3.3.0"
5050
},
5151
"devDependencies": {
52-
"@babel/core": "^7.20.2",
53-
"@babel/plugin-transform-modules-commonjs": "^7.19.6",
54-
"@babel/register": "^7.18.9",
5552
"@eslint-community/eslint-plugin-mysticatea": "^15.2.0",
53+
"c8": "^7.12.0",
5654
"dot-prop": "^6.0.1",
5755
"eslint": "^8.28.0",
5856
"mocha": "^9.2.2",
5957
"npm-run-all": "^4.1.5",
60-
"nyc": "^15.1.0",
6158
"opener": "^1.5.2",
6259
"prettier": "2.8.3",
6360
"rimraf": "^3.0.2",

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import packageInfo from "./package.json"
1212
*/
1313
function config(ext) {
1414
return {
15-
input: "src/index.js",
15+
input: "src/index.mjs",
1616
output: {
1717
exports: ext === ".mjs" ? undefined : "named",
1818
file: `index${ext}`,

src/find-variable.js renamed to src/find-variable.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getInnermostScope } from "./get-innermost-scope"
1+
import { getInnermostScope } from "./get-innermost-scope.mjs"
22

33
/**
44
* Find the variable of a given name.

src/get-function-head-location.js renamed to src/get-function-head-location.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isArrowToken, isOpeningParenToken } from "./token-predicate"
1+
import { isArrowToken, isOpeningParenToken } from "./token-predicate.mjs"
22

33
/**
44
* Get the `(` token of the given function node.

src/get-function-name-with-kind.js renamed to src/get-function-name-with-kind.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getPropertyName } from "./get-property-name"
1+
import { getPropertyName } from "./get-property-name.mjs"
22

33
/**
44
* Get the name and kind of the given function node.
File renamed without changes.

0 commit comments

Comments
 (0)