@gtvmbh/eslint-config 2.0.0-rc.2 → 2.0.0-rc.4

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/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Using the GTV ESLint configurations
2
2
 
3
3
  1. Run `npm i @gtvmbh/eslint-config --save-dev` to install the GTV ESLint configuration. Take note of the messages about missing peer dependencies.
4
- 2. Add a file named `eslint.config.js` in the project root. Pick the configuration that fits your project type:
4
+ 2. Add a file named `eslint.config.mjs` in the project root (or set `"type": "module"` in your `package.json` if you want to keep `eslint.config.js`). Pick the configuration that fits your project type:
5
5
  * JavaScript:
6
6
  ```js
7
7
  import jsConfig from '@gtvmbh/eslint-config';
@@ -10,20 +10,20 @@
10
10
  ```
11
11
  * TypeScript:
12
12
  ```js
13
- import tsConfig from '@gtvmbh/eslint-config/eslint-config-ts';
13
+ import tsConfig from '@gtvmbh/eslint-config/typescript';
14
14
 
15
15
  export default tsConfig;
16
16
  ```
17
17
  * Angular:
18
18
  ```js
19
- import angularConfig from '@gtvmbh/eslint-config/eslint-config-angular';
19
+ import angularConfig from '@gtvmbh/eslint-config/angular';
20
20
 
21
21
  export default angularConfig;
22
22
  ```
23
23
  * ViDaLa (layer on top of TypeScript):
24
24
  ```js
25
- import tsConfig from '@gtvmbh/eslint-config/eslint-config-ts';
26
- import vidalaConfig from '@gtvmbh/eslint-config/eslint-config-vidala';
25
+ import tsConfig from '@gtvmbh/eslint-config/typescript';
26
+ import vidalaConfig from '@gtvmbh/eslint-config/vidala';
27
27
 
28
28
  export default [
29
29
  ...tsConfig,
@@ -1,5 +1,5 @@
1
1
  import { defineConfig } from 'eslint/config';
2
- import typescriptConfig from './eslint-config-ts';
2
+ import typescriptConfig from './eslint-config-ts.js';
3
3
 
4
4
  export default defineConfig([
5
5
  ...typescriptConfig,
@@ -1,10 +1,18 @@
1
1
  import { defineConfig } from 'eslint/config';
2
2
  import tseslint from 'typescript-eslint';
3
- import javascriptConfig from './index';
3
+ import javascriptConfig from './index.js';
4
4
 
5
5
  export default defineConfig([
6
6
  ...javascriptConfig,
7
7
  ...tseslint.configs.strictTypeChecked,
8
+ {
9
+ files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
10
+ languageOptions: {
11
+ parserOptions: {
12
+ projectService: true
13
+ }
14
+ }
15
+ },
8
16
  {
9
17
  files: ['**/*.ts', '**/*.tsx'],
10
18
  rules: {
@@ -0,0 +1,13 @@
1
+ import angularConfig from '@gtvmbh/eslint-config/angular';
2
+
3
+ export default [
4
+ ...angularConfig,
5
+ {
6
+ rules: {
7
+ // Projektspezifische Regeln
8
+ }
9
+ },
10
+ {
11
+ ignores: ['dist/', 'node_modules/']
12
+ }
13
+ ];
@@ -0,0 +1,13 @@
1
+ import jsConfig from '@gtvmbh/eslint-config';
2
+
3
+ export default [
4
+ ...jsConfig,
5
+ {
6
+ rules: {
7
+ // Projektspezifische Regeln
8
+ }
9
+ },
10
+ {
11
+ ignores: ['dist/', 'node_modules/']
12
+ }
13
+ ];
@@ -0,0 +1,13 @@
1
+ import tsConfig from '@gtvmbh/eslint-config/typescript';
2
+
3
+ export default [
4
+ ...tsConfig,
5
+ {
6
+ rules: {
7
+ // Projektspezifische Regeln
8
+ }
9
+ },
10
+ {
11
+ ignores: ['dist/', 'node_modules/']
12
+ }
13
+ ];
@@ -0,0 +1,15 @@
1
+ import tsConfig from '@gtvmbh/eslint-config/typescript';
2
+ import vidalaConfig from '@gtvmbh/eslint-config/vidala';
3
+
4
+ export default [
5
+ ...tsConfig,
6
+ ...vidalaConfig,
7
+ {
8
+ rules: {
9
+ // Projektspezifische Regeln
10
+ }
11
+ },
12
+ {
13
+ ignores: ['dist/', 'node_modules/']
14
+ }
15
+ ];
package/index.js CHANGED
@@ -4,13 +4,9 @@ import js from '@eslint/js';
4
4
 
5
5
  export default defineConfig([
6
6
  {
7
- plugins: {
8
- '@stylistic': stylistic,
9
- js
10
- },
11
7
  extends: [
12
- 'js/recommended',
13
- 'plugin:@stylistic/recommended-extends'
8
+ js.configs.recommended,
9
+ stylistic.configs.recommended
14
10
  ],
15
11
  files: ['**/*.js', '**/*.jsx'],
16
12
  rules: {
package/package.json CHANGED
@@ -1,8 +1,17 @@
1
1
  {
2
2
  "name": "@gtvmbh/eslint-config",
3
- "version": "2.0.0-rc.2",
3
+ "version": "2.0.0-rc.4",
4
4
  "description": "ESLint configurations for various project types developed by Gesellschaft für Technische Visualistik",
5
5
  "main": "index.js",
6
+ "exports": {
7
+ ".": "./index.js",
8
+ "./typescript": "./eslint-config-ts.js",
9
+ "./typescript.js": "./eslint-config-ts.js",
10
+ "./angular": "./eslint-config-angular.js",
11
+ "./angular.js": "./eslint-config-angular.js",
12
+ "./vidala": "./eslint-config-vidala.js",
13
+ "./vidala.js": "./eslint-config-vidala.js"
14
+ },
6
15
  "scripts": {
7
16
  "test": "echo \"Warning: no test specified\""
8
17
  },
@@ -1,23 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- parser: '@typescript-eslint/parser',
4
- env: {
5
- 'browser': true,
6
- 'node': true,
7
- 'es2020': true,
8
- 'jasmine': true
9
- },
10
- parserOptions: {
11
- 'sourceType': 'module',
12
- 'project': './tsconfig.json',
13
- },
14
- extends: [
15
- '@gtvmbh/eslint-config/eslint-config-angular'
16
- ],
17
- ignorePatterns: [
18
- '.eslintrc.js'
19
- ],
20
- rules: {
21
- // add custom per-project rules here
22
- }
23
- };
@@ -1,19 +0,0 @@
1
- // rename this file to '.eslintrc.js' and put it in the project root
2
- module.exports = {
3
- root: true,
4
- env: {
5
- 'browser': true,
6
- 'node': true,
7
- 'es2020': true,
8
- 'jasmine': true
9
- },
10
- extends: [
11
- '@gtvmbh/eslint-config'
12
- ],
13
- ignorePatterns: [
14
- '.eslintrc.js'
15
- ],
16
- rules: {
17
- // add custom per-project rules here
18
- }
19
- };