Skip to content

Commit eb7c9f5

Browse files
committed
wip
1 parent 8c673b3 commit eb7c9f5

12 files changed

+328
-182
lines changed

.eslintrc.js

-3
This file was deleted.

eslint.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import dflex from "eslint-config-dflex";
2+
3+
4+
export default [
5+
...dflex
6+
];

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"description": "DFlex is a Javascript library for modern Drag and Drop apps.",
44
"private": true,
55
"license": "MIT",
6+
"type": "module",
67
"workspaces": [
78
"packages/**",
89
"playgrounds/**",

pnpm-lock.yaml

+254-164
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
import dflex from "eslint-config-dflex";
3+
4+
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
5+
import { fixupConfigRules } from "@eslint/compat";
6+
7+
8+
export default [
9+
...dflex,
10+
...fixupConfigRules(pluginReactConfig),
11+
];
+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
module.exports = require("./config.eslintrc");
1+
import dflexRect from "./eslint.config.js"
2+
3+
export default dflexRect

scripts/eslint-config-dflex-react/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"main": "index.js",
55
"license": "MIT",
66
"private": true,
7-
"dependencies": {
8-
"eslint": "^9.3.0",
9-
"eslint-plugin-jsx-a11y": "^6.8.0",
10-
"eslint-plugin-react": "^7.34.1",
11-
"eslint-plugin-react-hooks": "^4.6.2"
7+
"devDependencies": {
8+
"@eslint/compat": "^1.0.1",
9+
"eslint": "9.x",
10+
"eslint-config-dflex": "workspace:^",
11+
"eslint-plugin-react": "^7.34.1"
1212
}
1313
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import globals from "globals";
2+
import pluginJs from "@eslint/js";
3+
import tseslint from "typescript-eslint";
4+
import { FlatCompat } from "@eslint/eslintrc";
5+
import path from "path";
6+
import { fixupConfigRules } from "@eslint/compat";
7+
import { fileURLToPath } from "url";
8+
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = path.dirname(__filename);
11+
12+
13+
const compat = new FlatCompat({
14+
baseDirectory: __dirname
15+
});
16+
17+
18+
const OFF = 0;
19+
const ERROR = 2;
20+
21+
export default [
22+
{
23+
languageOptions: {
24+
ecmaVersion: 2022,
25+
sourceType: "module",
26+
globals: {
27+
__DEV__: "readonly",
28+
...globals.browser
29+
}
30+
},
31+
ignores: ["node_modules", "dist", "lib", "coverage", "**/*.d.ts"],
32+
},
33+
pluginJs.configs.recommended,
34+
...tseslint.configs.recommended,
35+
36+
37+
];

scripts/eslint-config-dflex/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
module.exports = require("./config.eslintrc");
1+
import dflex from "./eslint.config.js"
2+
3+
export default dflex

scripts/eslint-config-dflex/package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
"name": "eslint-config-dflex",
33
"version": "0.3.0",
44
"private": true,
5+
"type": "module",
56
"main": "index.js",
67
"license": "MIT",
7-
"dependencies": {
8-
"@typescript-eslint/eslint-plugin": "^7.10.0",
9-
"@typescript-eslint/parser": "^7.10.0",
10-
"eslint": "^9.3.0",
8+
"devDependencies": {
9+
"@eslint/eslintrc": "^3.1.0",
10+
"@eslint/js": "^9.3.0",
11+
"eslint": "^8.2.0",
1112
"eslint-config-airbnb-base": "^15.0.0",
12-
"eslint-config-prettier": "^9.1.0",
13-
"eslint-import-resolver-typescript": "^3.6.1",
14-
"eslint-plugin-import": "^2.29.1",
15-
"eslint-plugin-prettier": "^5.1.3"
13+
"eslint-plugin-import": "^2.25.2",
14+
"globals": "^15.3.0",
15+
"typescript-eslint": "^7.10.0"
1616
}
1717
}

0 commit comments

Comments
 (0)