Skip to content

Commit 0344994

Browse files
committed
Update to latest babel and eslint and fix issues
1 parent 88c6de4 commit 0344994

File tree

8 files changed

+1621
-2448
lines changed

8 files changed

+1621
-2448
lines changed

.babelrc

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
{
22
"presets": [
3-
"es2015",
4-
"stage-1"
3+
[
4+
"@babel/preset-env",
5+
{
6+
"targets": {
7+
"node": "16"
8+
}
9+
}
10+
]
511
],
612
"plugins": [
7-
"syntax-flow",
8-
"transform-flow-strip-types"
13+
"@babel/plugin-syntax-flow",
14+
"@babel/transform-flow-strip-types",
15+
"@babel/plugin-proposal-export-default-from"
916
],
1017
"sourceMaps": "inline"
1118
}

.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"parser": "babel-eslint",
2+
"parser": "@babel/eslint-parser",
33
"extends": [
44
"standard",
55
"plugin:import/errors",

lib/core/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ export const getPropertyName = (node: JsNode): ?string => {
3737
we won't use node.property.name because it is for cases like
3838
s[abc] where abc is a variable
3939
*/
40-
? node.property.value
41-
/* dot notation, eg s.header */
42-
: node.property.name;
40+
? node.property.value
41+
/* dot notation, eg s.header */
42+
: node.property.name;
4343

4444
/*
4545
skip property names starting with _

lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const configs = {
44
recommended: {
55
rules: {
66
'css-modules/no-unused-class': 2, // error
7-
'css-modules/no-undef-class': 2, // error
7+
'css-modules/no-undef-class': 2, // error
88
}
99
}
1010
};

package.json

+10-9
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"my-publish": "npm run my-pre-publish && yarn publish"
1919
},
2020
"engines": {
21-
"node": ">=4.0.0"
21+
"node": ">=16.0.0"
2222
},
2323
"packageManager": "[email protected]",
2424
"keywords": [
@@ -42,14 +42,14 @@
4242
"eslint-plugin-import": "*"
4343
},
4444
"devDependencies": {
45-
"babel-cli": "^6.26.0",
46-
"babel-core": "^6.26.3",
47-
"babel-eslint": "^10.1.0",
48-
"babel-plugin-syntax-flow": "^6.18.0",
49-
"babel-plugin-transform-flow-strip-types": "^6.22.0",
50-
"babel-preset-es2015": "^6.24.1",
51-
"babel-preset-stage-1": "^6.24.1",
52-
"babel-register": "^6.26.0",
45+
"@babel/cli": "^7.19.3",
46+
"@babel/core": "^7.20.2",
47+
"@babel/eslint-parser": "^7.19.1",
48+
"@babel/plugin-proposal-export-default-from": "^7.18.10",
49+
"@babel/plugin-syntax-flow": "^7.18.6",
50+
"@babel/plugin-transform-flow-strip-types": "^7.19.0",
51+
"@babel/preset-env": "^7.20.2",
52+
"@babel/register": "^7.18.9",
5353
"babel-watch": "^7.7.0",
5454
"chai": "^4.3.6",
5555
"concurrently": "^7.5.0",
@@ -58,6 +58,7 @@
5858
"eslint-module-utils": "^2.7.4",
5959
"eslint-plugin-flowtype": "^8.0.3",
6060
"eslint-plugin-import": "^2.26.0",
61+
"eslint-plugin-n": "^15.4.0",
6162
"eslint-plugin-promise": "^6.1.1",
6263
"eslint-plugin-standard": "^5.0.0",
6364
"flow-bin": "^0.192.0",
File renamed without changes.

test/lib/rules/no-undef-class.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ruleTester.run('no-undef-class', rule, {
1818
// test({
1919
// code: `
2020
// import s from 'test/files/noUndefClass1.scss';
21-
//
21+
//
2222
// export default Foo = () => (
2323
// <div className={s.container}></div>
2424
// );

0 commit comments

Comments
 (0)