@skilbjo/config-rc 1.0.16 → 1.0.18

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/.depcheckrc CHANGED
@@ -3,9 +3,5 @@ ignores: [
3
3
  '@commitlint/config-angular',
4
4
  '@tsconfig/node18',
5
5
  '@types/jest',
6
- 'husky',
7
- 'eslint-import-resolver-typescript',
8
- 'eslint-plugin-n',
9
- 'eslint-plugin-security',
10
- 'typescript',
6
+ 'husky'
11
7
  ]
package/.eslintrc.cjs ADDED
@@ -0,0 +1,87 @@
1
+ module.exports = {
2
+ env: {
3
+ es6: true,
4
+ 'jest/globals': true,
5
+ node: true,
6
+ },
7
+ extends: [
8
+ 'prettier',
9
+ 'typescript',
10
+ 'eslint:recommended',
11
+ 'plugin:@typescript-eslint/recommended',
12
+ 'plugin:@typescript-eslint/strict',
13
+ 'plugin:import/recommended',
14
+ 'plugin:import/typescript',
15
+ 'plugin:n/recommended',
16
+ 'plugin:prettier/recommended',
17
+ 'plugin:security/recommended-legacy',
18
+ 'plugin:perfectionist/recommended-alphabetical-legacy',
19
+ ],
20
+ globals: {
21
+ Atomics: 'readonly',
22
+ SharedArrayBuffer: 'readonly',
23
+ },
24
+ parser: '@typescript-eslint/parser',
25
+ parserOptions: {
26
+ ecmaVersion: 2022,
27
+ project: './tsconfig.json',
28
+ sourceType: 'module',
29
+ },
30
+ plugins: [
31
+ '@typescript-eslint',
32
+ 'import',
33
+ 'jest',
34
+ 'prettier',
35
+ 'perfectionist',
36
+ ],
37
+ reportUnusedDisableDirectives: true,
38
+ rules: {
39
+ '@typescript-eslint/consistent-type-definitions': ['error', 'type'],
40
+ '@typescript-eslint/no-floating-promises': 'error',
41
+ '@typescript-eslint/no-misused-promises': 'error',
42
+ '@typescript-eslint/no-non-null-assertion': 1,
43
+ '@typescript-eslint/no-unused-vars': 1,
44
+ eqeqeq: 2,
45
+ 'import/default': 2,
46
+ 'import/export': 2,
47
+ 'import/named': 2,
48
+ 'import/namespace': 2,
49
+ 'import/newline-after-import': 2,
50
+ 'import/no-duplicates': 2,
51
+ 'import/no-unresolved': 2,
52
+ 'import/order': 2,
53
+ 'n/no-missing-import': 'off', // conflicts with typescript absolute imports
54
+ 'n/no-unsupported-features/es-syntax': 'off',
55
+ 'n/shebang': 'off',
56
+ 'no-multiple-empty-lines': [2, { max: 1, maxEOF: 0 }],
57
+ 'perfectionist/sort-exports': 'off',
58
+ 'perfectionist/sort-imports': 'off',
59
+ 'prettier/prettier': [
60
+ 'error',
61
+ {
62
+ arrowParens: 'always',
63
+ printWidth: 80,
64
+ semi: true,
65
+ singleQuote: true,
66
+ tabWidth: 2,
67
+ trailingComma: 'es5',
68
+ },
69
+ ],
70
+ 'security/detect-object-injection': 'off',
71
+ },
72
+ settings: {
73
+ 'import/parsers': {
74
+ '@typescript-eslint/parser': ['.ts'],
75
+ },
76
+ 'import/resolver': {
77
+ node: { extensions: ['.ts', '.js'] }, // leave this
78
+ typescript: {
79
+ alwaysTryTypes: true,
80
+ },
81
+ },
82
+ node: {
83
+ resolvePaths: ['node_modules/@types'],
84
+ tryExtensions: ['.js', '.json', '.node', '.ts', '.d.ts'],
85
+ },
86
+ },
87
+ };
package/CHANGELOG.md CHANGED
@@ -1,9 +1,12 @@
1
- ## [1.0.16](https://github.com/skilbjo/config-rc/compare/v1.0.15...v1.0.16) (2024-10-15)
1
+ ## [1.0.18](https://github.com/skilbjo/config-rc/compare/v1.0.17...v1.0.18) (2024-10-17)
2
2
 
3
3
 
4
- ### Bug Fixes
4
+ ### Reverts
5
5
 
6
- * eslint@9 ([#166](https://github.com/skilbjo/config-rc/issues/166)) ([72cdf4b](https://github.com/skilbjo/config-rc/commit/72cdf4b428954a701680199881df374b00f5f46e))
6
+ * Revert "fix: eslint@9 (#166)" ([1ca2d76](https://github.com/skilbjo/config-rc/commit/1ca2d7635b0541d432a781304312deb4c8c4e20f)), closes [#166](https://github.com/skilbjo/config-rc/issues/166)
7
+ * Revert "docs(release): 1.0.16 [skip ci]" ([e0b0fb1](https://github.com/skilbjo/config-rc/commit/e0b0fb14232c550a544230571139668f150fbed1))
8
+ * Revert "fix: use correct file" ([b47e903](https://github.com/skilbjo/config-rc/commit/b47e9035013e9c8dc2d82976f3327a0f2a55e91b))
9
+ * Revert "docs(release): 1.0.17 [skip ci]" ([7f55c51](https://github.com/skilbjo/config-rc/commit/7f55c51cfdc3ac792a3715dc2ccb2aa43f79a03f))
7
10
 
8
11
  ## [1.0.15](https://github.com/skilbjo/config-rc/compare/v1.0.14...v1.0.15) (2024-10-15)
9
12
 
package/index.js CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  // const require = createRequire(import.meta.url);
4
4
 
5
- const eslintrc = require('./.eslintrc.cjs'); // eslint-disable-line @typescript-eslint/no-require-imports, n/no-missing-require
5
+ const eslintrc = require('./.eslintrc.cjs'); // eslint-disable-line @typescript-eslint/no-var-requires, n/no-missing-require
6
6
 
7
7
  module.exports = eslintrc;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@skilbjo/config-rc",
4
- "version": "1.0.16",
4
+ "version": "1.0.18",
5
5
  "description": "eslint, prettier, & tsconfig config",
6
6
  "main": "index.js",
7
7
  "scripts": {
@@ -22,15 +22,13 @@
22
22
  },
23
23
  "homepage": "https://github.com/skilbjo/config-rc#readme",
24
24
  "dependencies": {
25
- "@eslint/compat": "1.2.0",
26
- "@eslint/eslintrc": "3.1.0",
27
- "@eslint/js": "9.12.0",
28
25
  "@tsconfig/node20": "20.1.4",
29
26
  "@types/jest": "29.5.12",
30
- "@typescript-eslint/eslint-plugin": "8.8.0",
31
- "@typescript-eslint/parser": "8.8.0",
32
- "eslint": "9.12.0",
27
+ "@typescript-eslint/eslint-plugin": "7.17.0",
28
+ "@typescript-eslint/parser": "7.18.0",
29
+ "eslint": "8.57.0",
33
30
  "eslint-config-prettier": "9.1.0",
31
+ "eslint-config-typescript": "3.0.0",
34
32
  "eslint-import-resolver-typescript": "3.6.3",
35
33
  "eslint-plugin-import": "2.31.0",
36
34
  "eslint-plugin-jest": "28.8.3",
@@ -38,7 +36,6 @@
38
36
  "eslint-plugin-perfectionist": "3.8.0",
39
37
  "eslint-plugin-prettier": "5.2.1",
40
38
  "eslint-plugin-security": "3.0.1",
41
- "globals": "15.11.0",
42
39
  "prettier": "3.3.3",
43
40
  "typescript": "5.6.3"
44
41
  },
@@ -55,7 +52,7 @@
55
52
  ]
56
53
  },
57
54
  "engines": {
58
- "node": ">=20.0.0"
55
+ "node": ">=16.0.0"
59
56
  },
60
57
  "publishConfig": {
61
58
  "registry": "https://registry.npmjs.org/"
package/tsconfig.json CHANGED
@@ -11,7 +11,6 @@
11
11
  "ES2023"
12
12
  ],
13
13
 
14
- "allowJs": true,
15
14
  "outDir": "dist",
16
15
  "declaration": true,
17
16
  "forceConsistentCasingInFileNames": true,
@@ -33,7 +32,6 @@
33
32
  "src/**/*.ts",
34
33
  "test/**/*.ts",
35
34
  ".eslintrc.cjs",
36
- "eslint.config.cjs",
37
35
  "index.js"
38
36
  ],
39
37
  "exclude": [
package/eslint.config.cjs DELETED
@@ -1,121 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-require-imports, n/no-unpublished-require */
2
- const path = require('path');
3
- const { fixupConfigRules, fixupPluginRules } = require('@eslint/compat');
4
- const { FlatCompat } = require('@eslint/eslintrc');
5
- const js = require('@eslint/js');
6
- const typescriptEslint = require('@typescript-eslint/eslint-plugin');
7
- const tsParser = require('@typescript-eslint/parser');
8
- const _import = require('eslint-plugin-import');
9
- const jest = require('eslint-plugin-jest');
10
- const perfectionist = require('eslint-plugin-perfectionist');
11
- const prettier = require('eslint-plugin-prettier');
12
- const globals = require('globals');
13
-
14
- const compat = new FlatCompat({
15
- allConfig: js.configs.all,
16
- baseDirectory: __dirname,
17
- recommendedConfig: js.configs.recommended,
18
- });
19
-
20
- module.exports = [
21
- ...fixupConfigRules(
22
- compat.extends(
23
- 'prettier',
24
- 'eslint:recommended',
25
- 'plugin:@typescript-eslint/recommended',
26
- 'plugin:@typescript-eslint/strict',
27
- 'plugin:import/recommended',
28
- 'plugin:import/typescript',
29
- 'plugin:n/recommended',
30
- 'plugin:prettier/recommended',
31
- 'plugin:security/recommended-legacy',
32
- 'plugin:perfectionist/recommended-alphabetical-legacy'
33
- )
34
- ),
35
- {
36
- files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.cjs'],
37
- languageOptions: {
38
- ecmaVersion: 2022,
39
- globals: {
40
- ...jest.environments.globals.globals,
41
- ...globals.node,
42
- Atomics: 'readonly',
43
- SharedArrayBuffer: 'readonly',
44
- },
45
- parser: tsParser,
46
- parserOptions: {
47
- project: path.resolve(__dirname, './tsconfig.json'),
48
- sourceType: 'module',
49
- tsconfigRootDir: __dirname,
50
- },
51
- sourceType: 'module',
52
- },
53
- linterOptions: {
54
- reportUnusedDisableDirectives: true,
55
- },
56
- plugins: {
57
- '@typescript-eslint': fixupPluginRules(typescriptEslint),
58
- import: fixupPluginRules(_import),
59
- jest,
60
- perfectionist: fixupPluginRules(perfectionist),
61
- prettier: fixupPluginRules(prettier),
62
- },
63
- rules: {
64
- '@typescript-eslint/consistent-type-definitions': ['error', 'type'],
65
- '@typescript-eslint/no-floating-promises': 'error',
66
- '@typescript-eslint/no-misused-promises': 'error',
67
- '@typescript-eslint/no-non-null-assertion': 1,
68
- '@typescript-eslint/no-unused-vars': 1,
69
- eqeqeq: 2,
70
- 'import/default': 2,
71
- 'import/export': 2,
72
- 'import/named': 2,
73
- 'import/namespace': 2,
74
- 'import/newline-after-import': 2,
75
- 'import/no-duplicates': 2,
76
- 'import/no-unresolved': 2,
77
- 'import/order': 2,
78
- 'n/no-missing-import': 'off',
79
- 'n/no-unsupported-features/es-syntax': 'off',
80
- 'n/shebang': 'off',
81
- 'no-multiple-empty-lines': [
82
- 2,
83
- {
84
- max: 1,
85
- maxEOF: 0,
86
- },
87
- ],
88
- 'perfectionist/sort-exports': 'off',
89
- 'perfectionist/sort-imports': 'off',
90
- 'prettier/prettier': [
91
- 'error',
92
- {
93
- arrowParens: 'always',
94
- printWidth: 80,
95
- semi: true,
96
- singleQuote: true,
97
- tabWidth: 2,
98
- trailingComma: 'es5',
99
- },
100
- ],
101
- 'security/detect-object-injection': 'off',
102
- },
103
- settings: {
104
- 'import/parsers': {
105
- '@typescript-eslint/parser': ['.ts', '.js'],
106
- },
107
- 'import/resolver': {
108
- node: {
109
- extensions: ['.ts', '.js'],
110
- },
111
- typescript: {
112
- alwaysTryTypes: true,
113
- },
114
- },
115
- node: {
116
- resolvePaths: ['node_modules/@types'],
117
- tryExtensions: ['.js', '.json', '.node', '.ts', '.d.ts'],
118
- },
119
- },
120
- },
121
- ];