@tpluscode/eslint-config 2.2.0 → 2.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.2.2
4
+ ### Patch Changes
5
+
6
+ - 330de86: Wrong base config for `ts-no-rdf`
7
+
8
+ ## 2.2.1
9
+ ### Patch Changes
10
+
11
+ - dbd9432: Also added `ts-no-rdf` module which includes TS support without RDF plugin
12
+
3
13
  ## 2.2.0
4
14
  ### Minor Changes
5
15
 
package/index.js CHANGED
@@ -1,67 +1,12 @@
1
- import tsPlugin from '@typescript-eslint/eslint-plugin'
2
- import tsParser from '@typescript-eslint/parser'
3
- import importPlugin from 'eslint-plugin-import'
4
- import jsConfig from './js.js'
5
-
6
- function rulesFrom(config) {
7
- return config && config.rules ? config.rules : {}
8
- }
1
+ import rdf from 'eslint-plugin-rdf'
2
+ import defaults from './ts-no-rdf.js'
9
3
 
10
4
  export default [
11
- ...jsConfig,
5
+ ...defaults,
6
+ rdf.configs.js,
12
7
  {
13
- files: ['**/*.{ts,mts,cts,tsx}'],
14
- languageOptions: {
15
- parser: tsParser,
16
- parserOptions: {
17
- sourceType: 'module',
18
- },
19
- },
20
8
  plugins: {
21
- '@typescript-eslint': tsPlugin,
22
- },
23
- settings: {
24
- 'import/parsers': {
25
- '@typescript-eslint/parser': ['.ts', '.tsx', '.mts', '.cts'],
26
- },
27
- 'import/resolver': {
28
- typescript: {
29
- alwaysTryTypes: true,
30
- },
31
- },
32
- },
33
- rules: {
34
- ...rulesFrom(tsPlugin.configs.recommended),
35
- ...rulesFrom(importPlugin.configs.typescript),
36
-
37
- 'no-dupe-class-members': 'off',
38
- 'no-redeclare': 'off',
39
- '@typescript-eslint/no-redeclare': 'warn',
40
- 'no-unused-vars': 'off',
41
- '@typescript-eslint/consistent-type-exports': 'error',
42
- '@typescript-eslint/consistent-type-imports': 'error',
43
- 'no-useless-constructor': 'off',
44
- '@typescript-eslint/no-useless-constructor': 'error',
45
- 'no-undef': 'off',
46
- '@typescript-eslint/no-empty-object-type': ['error', {
47
- allowInterfaces: 'with-single-extends',
48
- }],
49
- '@typescript-eslint/no-explicit-any': ['error', {
50
- ignoreRestArgs: true,
51
- }],
52
- },
53
- },
54
- {
55
- files: [
56
- '**/*.test.js',
57
- '**/*.spec.js',
58
- '**/*.test.mjs',
59
- '**/*.spec.mjs',
60
- '**/*.test.ts',
61
- '**/*.spec.ts',
62
- ],
63
- rules: {
64
- '@typescript-eslint/no-unused-expressions': 'off',
9
+ rdf,
65
10
  },
66
11
  },
67
12
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tpluscode/eslint-config",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "exports": {
12
12
  "./js": "./js.js",
13
13
  "./no-rdf": "./no-rdf.js",
14
+ "./ts-no-rdf": "./ts-no-rdf.js",
14
15
  ".": "./index.js"
15
16
  },
16
17
  "engines": {
package/ts-no-rdf.js ADDED
@@ -0,0 +1,67 @@
1
+ import tsPlugin from '@typescript-eslint/eslint-plugin'
2
+ import tsParser from '@typescript-eslint/parser'
3
+ import importPlugin from 'eslint-plugin-import'
4
+ import jsConfig from './no-rdf.js'
5
+
6
+ function rulesFrom(config) {
7
+ return config && config.rules ? config.rules : {}
8
+ }
9
+
10
+ export default [
11
+ ...jsConfig,
12
+ {
13
+ files: ['**/*.{ts,mts,cts,tsx}'],
14
+ languageOptions: {
15
+ parser: tsParser,
16
+ parserOptions: {
17
+ sourceType: 'module',
18
+ },
19
+ },
20
+ plugins: {
21
+ '@typescript-eslint': tsPlugin,
22
+ },
23
+ settings: {
24
+ 'import/parsers': {
25
+ '@typescript-eslint/parser': ['.ts', '.tsx', '.mts', '.cts'],
26
+ },
27
+ 'import/resolver': {
28
+ typescript: {
29
+ alwaysTryTypes: true,
30
+ },
31
+ },
32
+ },
33
+ rules: {
34
+ ...rulesFrom(tsPlugin.configs.recommended),
35
+ ...rulesFrom(importPlugin.configs.typescript),
36
+
37
+ 'no-dupe-class-members': 'off',
38
+ 'no-redeclare': 'off',
39
+ '@typescript-eslint/no-redeclare': 'warn',
40
+ 'no-unused-vars': 'off',
41
+ '@typescript-eslint/consistent-type-exports': 'error',
42
+ '@typescript-eslint/consistent-type-imports': 'error',
43
+ 'no-useless-constructor': 'off',
44
+ '@typescript-eslint/no-useless-constructor': 'error',
45
+ 'no-undef': 'off',
46
+ '@typescript-eslint/no-empty-object-type': ['error', {
47
+ allowInterfaces: 'with-single-extends',
48
+ }],
49
+ '@typescript-eslint/no-explicit-any': ['error', {
50
+ ignoreRestArgs: true,
51
+ }],
52
+ },
53
+ },
54
+ {
55
+ files: [
56
+ '**/*.test.js',
57
+ '**/*.spec.js',
58
+ '**/*.test.mjs',
59
+ '**/*.spec.mjs',
60
+ '**/*.test.ts',
61
+ '**/*.spec.ts',
62
+ ],
63
+ rules: {
64
+ '@typescript-eslint/no-unused-expressions': 'off',
65
+ },
66
+ },
67
+ ]