@dmitryrechkin/eslint-standard 1.0.6 → 1.0.7
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/eslint.config.mjs +12 -5
- package/package.json +18 -18
- package/tsconfig.json +4 -0
- package/.npmignore +0 -3
package/eslint.config.mjs
CHANGED
|
@@ -3,13 +3,19 @@ import tsParser from '@typescript-eslint/parser';
|
|
|
3
3
|
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
|
4
4
|
import unusedImportsPlugin from 'eslint-plugin-unused-imports';
|
|
5
5
|
|
|
6
|
-
export default function ({
|
|
6
|
+
export default function ({
|
|
7
|
+
tsconfigPath = './tsconfig.json',
|
|
8
|
+
ignores = [],
|
|
9
|
+
files = [],
|
|
10
|
+
plugins = {},
|
|
11
|
+
rules = {}
|
|
12
|
+
} = {}) {
|
|
7
13
|
return [
|
|
8
14
|
{
|
|
9
|
-
ignores: ['node_modules/**', 'dist/**'],
|
|
15
|
+
ignores: ['node_modules/**', 'dist/**', ...ignores],
|
|
10
16
|
},
|
|
11
17
|
{
|
|
12
|
-
files: ['**/*.{js,jsx,ts,tsx}'],
|
|
18
|
+
files: ['**/*.{js,jsx,ts,tsx}', ...files],
|
|
13
19
|
languageOptions: {
|
|
14
20
|
parser: tsParser,
|
|
15
21
|
parserOptions: {
|
|
@@ -21,13 +27,13 @@ export default function ({ tsconfigPath = './tsconfig.json' } = {}) {
|
|
|
21
27
|
plugins: {
|
|
22
28
|
'@typescript-eslint': tsPlugin,
|
|
23
29
|
'unused-imports': unusedImportsPlugin,
|
|
30
|
+
...plugins,
|
|
24
31
|
},
|
|
25
32
|
rules: {
|
|
26
33
|
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
27
|
-
//'linebreak-style': 'off', // Disable linebreak style rule
|
|
28
34
|
'@typescript-eslint/no-explicit-any': 'off', // Turn off the rule for no-explicit-any
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
// coding guidelines
|
|
31
37
|
'brace-style': ['error', 'allman', { allowSingleLine: true }], // Use Allman style for braces
|
|
32
38
|
indent: ['error', 'tab', { SwitchCase: 1 }],
|
|
33
39
|
quotes: ['error', 'single'],
|
|
@@ -99,6 +105,7 @@ export default function ({ tsconfigPath = './tsconfig.json' } = {}) {
|
|
|
99
105
|
argsIgnorePattern: '^_',
|
|
100
106
|
},
|
|
101
107
|
],
|
|
108
|
+
...rules,
|
|
102
109
|
},
|
|
103
110
|
},
|
|
104
111
|
];
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
"name": "@dmitryrechkin/eslint-standard",
|
|
3
|
+
"description": "This package provides a shared ESLint configuration which includes TypeScript support and a set of specific linting rules designed to ensure high-quality and consistent code style across projects.",
|
|
4
|
+
"version": "1.0.7",
|
|
5
|
+
"main": "eslint.config.mjs",
|
|
6
|
+
"keywords": [],
|
|
7
|
+
"author": "",
|
|
8
|
+
"license": "ISC",
|
|
9
|
+
"peerDependencies": {
|
|
10
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
11
|
+
"@typescript-eslint/parser": "^7.0.0",
|
|
12
|
+
"eslint": "^8.0.0",
|
|
13
|
+
"eslint-plugin-unused-imports": "^3.0.0"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"postinstall": "echo 'Remember to install peer dependencies:\n npm install eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-unused-imports --save-dev\n bun add eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-unused-imports --dev'",
|
|
17
|
+
"package:publish": "bunx publish --access public"
|
|
18
|
+
}
|
|
19
|
+
}
|
package/tsconfig.json
CHANGED
package/.npmignore
DELETED