@meduscinema/core 1.0.7 → 1.0.9
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/package.json +10 -5
- package/src/eslint.config.mjs +65 -0
- package/src/prettier.config.mjs +4 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meduscinema/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": "MedusCode",
|
|
6
6
|
"license": "ISC",
|
|
@@ -13,12 +13,17 @@
|
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
+
"eslint": "^9.0.0",
|
|
16
17
|
"prettier": "^3.0.0"
|
|
17
18
|
},
|
|
18
|
-
"dependencies": {
|
|
19
|
-
"@trivago/prettier-plugin-sort-imports": "^5.2.2"
|
|
20
|
-
},
|
|
21
19
|
"exports": {
|
|
22
|
-
"./prettier": "./src/prettier.config.mjs"
|
|
20
|
+
"./prettier": "./src/prettier.config.mjs",
|
|
21
|
+
"./eslint": "./src/eslint.config.mjs"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@eslint/js": "9.x",
|
|
25
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
26
|
+
"globals": "^16.0.0",
|
|
27
|
+
"typescript-eslint": "^8.20.0"
|
|
23
28
|
}
|
|
24
29
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import eslint from '@eslint/js';
|
|
3
|
+
import globals from 'globals';
|
|
4
|
+
import tseslint from 'typescript-eslint';
|
|
5
|
+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
6
|
+
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import { dirname } from 'node:path';
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
|
|
13
|
+
/** @type {import('eslint').Linter.FlatConfig[]} */
|
|
14
|
+
export default tseslint.config(
|
|
15
|
+
{
|
|
16
|
+
ignores: [ 'eslint.config.mjs' ]
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
eslint.configs.recommended,
|
|
20
|
+
...tseslint.configs.recommendedTypeChecked,
|
|
21
|
+
|
|
22
|
+
{
|
|
23
|
+
languageOptions: {
|
|
24
|
+
globals: {
|
|
25
|
+
...globals.node,
|
|
26
|
+
...globals.jest
|
|
27
|
+
},
|
|
28
|
+
sourceType: 'module',
|
|
29
|
+
parserOptions: {
|
|
30
|
+
projectService: true,
|
|
31
|
+
tsconfigRootDir: __dirname
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
{
|
|
37
|
+
plugins: {
|
|
38
|
+
'simple-import-sort': simpleImportSort
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
rules: {
|
|
42
|
+
/* =======================
|
|
43
|
+
* Imports
|
|
44
|
+
* ======================= */
|
|
45
|
+
'simple-import-sort/imports': [ 'error', {
|
|
46
|
+
groups: [
|
|
47
|
+
[ '^\\u0000' ], // side effects
|
|
48
|
+
[ '^node:' ], // node builtins
|
|
49
|
+
[ '^@?\\w' ], // npm packages
|
|
50
|
+
[ '^@/' ], // aliases
|
|
51
|
+
[ '^\\.\\.(?!/?$)', '^\\.\\./?$' ], // parent
|
|
52
|
+
[ '^\\./' ] // relative
|
|
53
|
+
]
|
|
54
|
+
} ],
|
|
55
|
+
'simple-import-sort/exports': 'error',
|
|
56
|
+
|
|
57
|
+
'semi': 'off',
|
|
58
|
+
'@typescript-eslint/semi': 'off',
|
|
59
|
+
|
|
60
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
61
|
+
'@typescript-eslint/no-floating-promises': 'warn',
|
|
62
|
+
'@typescript-eslint/no-unsafe-argument': 'warn'
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
);
|
package/src/prettier.config.mjs
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
|
+
/** @type {import('prettier').Config} */
|
|
1
2
|
export default {
|
|
2
|
-
trailingComma:
|
|
3
|
+
trailingComma: 'none',
|
|
3
4
|
tabWidth: 2,
|
|
4
5
|
useTabs: true,
|
|
5
6
|
semi: true,
|
|
6
7
|
singleQuote: true,
|
|
7
8
|
jsxSingleQuote: true,
|
|
8
|
-
arrowParens:
|
|
9
|
-
|
|
10
|
-
importOrderSortSpecifiers: true,
|
|
11
|
-
importOrderCaseInsensitive: true,
|
|
12
|
-
importOrderParserPlugins: [
|
|
13
|
-
"classProperties",
|
|
14
|
-
"decorators-legacy",
|
|
15
|
-
"typescript"
|
|
16
|
-
],
|
|
17
|
-
importOrder: ["<THIRD_PARTY_MODULES>", "^@/(.*)$", "^../(.*)", "^./(.*)"],
|
|
18
|
-
plugins: ["@trivago/prettier-plugin-sort-imports"]
|
|
19
|
-
}
|
|
9
|
+
arrowParens: 'avoid'
|
|
10
|
+
};
|