Skip to content

Commit 7240f61

Browse files
authoredNov 13, 2021
feat: convert to native ESM module (#1038)
BREAKING CHANGE: _lint-staged_ is now a pure ESM module, and thus requires Node.js version `^12.20.0 || ^14.13.1 || >=16.0.0`. To update your Node.js integration, please use: ```js // const lintStaged = require('lint-staged') import lintStaged from 'lint-staged' ```
1 parent 64e4364 commit 7240f61

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3566
-3411
lines changed
 

‎.babelrc

-15
This file was deleted.

‎.eslintrc.json

+21-5
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,35 @@
66
"experimentalObjectRestSpread": true
77
},
88
"requireConfigFile": false,
9-
"sourceType": "script"
9+
"sourceType": "module"
1010
},
1111
"env": {
1212
"es6": true,
1313
"node": true
1414
},
15-
"extends": ["eslint:recommended", "prettier"],
15+
"extends": ["eslint:recommended", "plugin:import/recommended", "prettier"],
1616
"plugins": ["node", "import", "prettier"],
1717
"rules": {
18+
"import/order": [
19+
"error",
20+
{
21+
"groups": [
22+
"builtin",
23+
"external",
24+
"internal",
25+
"parent",
26+
"sibling",
27+
"index",
28+
"object",
29+
"type"
30+
],
31+
"newlines-between": "always"
32+
}
33+
],
1834
"no-console": "off",
19-
"node/no-unsupported-features/node-builtins": "off",
20-
"node/no-unsupported-features/es-syntax": ["error", { "version": ">=10.13.0" }],
21-
"node/no-unsupported-features/es-builtins": ["error", { "version": ">=10.13.0" }],
35+
"node/no-unsupported-features/es-builtins": "error",
36+
"node/no-unsupported-features/es-syntax": ["error", { "ignores": ["modules"] }],
37+
"node/no-unsupported-features/node-builtins": "error",
2238
"prettier/prettier": "error"
2339
}
2440
}

0 commit comments

Comments
 (0)
Please sign in to comment.