@dfinity/eslint-config-oisy-wallet 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +16 -1
- package/package.json +2 -3
- package/tsconfig.eslint.json +0 -39
package/index.cjs
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
2
|
+
const { join } = require("node:path");
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
4
|
+
const { existsSync } = require("node:fs");
|
|
5
|
+
|
|
6
|
+
const resolveProject = () => {
|
|
7
|
+
const eslintJson = join(process.cwd(), "tsconfig.eslint.json");
|
|
8
|
+
|
|
9
|
+
if (existsSync(eslintJson)) {
|
|
10
|
+
return eslintJson;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return join(process.cwd(), "tsconfig.json");
|
|
14
|
+
};
|
|
15
|
+
|
|
1
16
|
module.exports = {
|
|
2
17
|
root: true,
|
|
3
18
|
extends: [
|
|
@@ -10,7 +25,7 @@ module.exports = {
|
|
|
10
25
|
parserOptions: {
|
|
11
26
|
sourceType: "module",
|
|
12
27
|
ecmaVersion: 2020,
|
|
13
|
-
project: [
|
|
28
|
+
project: [resolveProject()],
|
|
14
29
|
},
|
|
15
30
|
env: {
|
|
16
31
|
browser: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dfinity/eslint-config-oisy-wallet",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Shared ESLint configurations from the Oisy Wallet team",
|
|
6
6
|
"repository": {
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
"LICENSE",
|
|
16
16
|
"index.cjs",
|
|
17
17
|
"svelte.cjs",
|
|
18
|
-
"eslint-local-rules.cjs"
|
|
19
|
-
"tsconfig.eslint.json"
|
|
18
|
+
"eslint-local-rules.cjs"
|
|
20
19
|
],
|
|
21
20
|
"exports": {
|
|
22
21
|
".": {
|
package/tsconfig.eslint.json
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"strict": true,
|
|
4
|
-
"target": "ES2020",
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"resolveJsonModule": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"skipLibCheck": true
|
|
10
|
-
},
|
|
11
|
-
"include": [
|
|
12
|
-
"./*.cjs",
|
|
13
|
-
"ambient.d.ts",
|
|
14
|
-
"non-ambient.d.ts",
|
|
15
|
-
"./types/**/$types.d.ts",
|
|
16
|
-
"./vite.config.js",
|
|
17
|
-
"./vite.config.ts",
|
|
18
|
-
"./src/**/*.js",
|
|
19
|
-
"./src/**/*.ts",
|
|
20
|
-
"./src/**/*.svelte",
|
|
21
|
-
"./env.utils.ts",
|
|
22
|
-
"./vitest.setup.ts",
|
|
23
|
-
"./vitest.config.ts",
|
|
24
|
-
"./tailwind.config.js",
|
|
25
|
-
"./svelte.config.js",
|
|
26
|
-
"./postcss.config.js",
|
|
27
|
-
"./playwright.config.ts",
|
|
28
|
-
"./e2e/**/*.js",
|
|
29
|
-
"./e2e/**/*.ts",
|
|
30
|
-
"./scripts/*.mjs",
|
|
31
|
-
"./scripts/*.ts"
|
|
32
|
-
],
|
|
33
|
-
"exclude": [
|
|
34
|
-
"./node_modules/**",
|
|
35
|
-
"./src/frontend/service-worker.js",
|
|
36
|
-
"./src/frontend/service-worker.ts",
|
|
37
|
-
"./src/frontend/service-worker.d.ts"
|
|
38
|
-
]
|
|
39
|
-
}
|