@dmitryrechkin/eslint-standard 1.0.5 → 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 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 ({ tsconfigPath = './tsconfig.json' } = {}) {
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
- /// coding guidelines
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
2
  "name": "@dmitryrechkin/eslint-standard",
3
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.5",
4
+ "version": "1.0.7",
5
5
  "main": "eslint.config.mjs",
6
- "scripts": {
7
- "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'",
8
- "package:publish": "bunx publish --access public"
9
- },
10
6
  "keywords": [],
11
7
  "author": "",
12
8
  "license": "ISC",
13
9
  "peerDependencies": {
14
- "@typescript-eslint/eslint-plugin": "^7.15.0",
15
- "@typescript-eslint/parser": "^7.15.0",
16
- "eslint": "^9.6.0",
17
- "eslint-plugin-unused-imports": "^4.0.0"
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
18
  }
19
19
  }
package/tsconfig.json CHANGED
@@ -8,6 +8,10 @@
8
8
  "ESNext"
9
9
  ]
10
10
  },
11
+ "include": [
12
+ "src/**/*.ts",
13
+ "tests/**/*.ts"
14
+ ],
11
15
  "exclude": [
12
16
  "node_modules"
13
17
  ]
package/.npmignore DELETED
@@ -1,3 +0,0 @@
1
- node_modules
2
- package-lock.json
3
- bun.lockb