@stardustsorcery/eslint-config 0.0.0-stage → 0.2.0

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/base.js ADDED
@@ -0,0 +1,41 @@
1
+ // @ts-check
2
+ import js from '@eslint/js';
3
+ import eslintConfigPrettier from 'eslint-config-prettier';
4
+ import {defineConfig} from 'eslint/config';
5
+ import tseslint from 'typescript-eslint';
6
+
7
+ export const baseConfig = defineConfig(
8
+ {
9
+ ignores: ['dist/**', 'build/**', 'coverage/**', '.turbo/**'],
10
+ },
11
+ js.configs.recommended,
12
+ ...tseslint.configs.strictTypeChecked,
13
+ ...tseslint.configs.stylisticTypeChecked,
14
+ {
15
+ languageOptions: {
16
+ parserOptions: {
17
+ projectService: true,
18
+ },
19
+ },
20
+ rules: {
21
+ '@typescript-eslint/no-unused-vars': [
22
+ 'error',
23
+ {
24
+ argsIgnorePattern: '^_',
25
+ varsIgnorePattern: '^_',
26
+ caughtErrorsIgnorePattern: '^_',
27
+ },
28
+ ],
29
+ '@typescript-eslint/restrict-template-expressions': [
30
+ 'error',
31
+ {allowNumber: true},
32
+ ],
33
+ '@typescript-eslint/consistent-type-definitions': 'off',
34
+ },
35
+ },
36
+ {
37
+ files: ['**/*.{js,mjs,cjs}'],
38
+ extends: [tseslint.configs.disableTypeChecked],
39
+ },
40
+ eslintConfigPrettier,
41
+ );
package/nestjs.js ADDED
@@ -0,0 +1,13 @@
1
+ // @ts-check
2
+ import {defineConfig} from 'eslint/config';
3
+ import globals from 'globals';
4
+ import {baseConfig} from './base.js';
5
+
6
+ export const nestConfig = defineConfig(...baseConfig, {
7
+ languageOptions: {
8
+ globals: globals.node,
9
+ },
10
+ rules: {
11
+ '@typescript-eslint/no-extraneous-class': 'off',
12
+ },
13
+ });
package/package.json CHANGED
@@ -1,6 +1,48 @@
1
1
  {
2
2
  "name": "@stardustsorcery/eslint-config",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0",
4
+ "description": "Shared ESLint Flat Config presets for TypeScript, React, and NestJS",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/StardustSorcery/development-utilities.git",
10
+ "directory": "typescript/packages/eslint-config"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "files": [
16
+ "base.js",
17
+ "react.js",
18
+ "vite-react.js",
19
+ "nestjs.js"
20
+ ],
21
+ "exports": {
22
+ "./base": "./base.js",
23
+ "./react": "./react.js",
24
+ "./vite-react": "./vite-react.js",
25
+ "./nestjs": "./nestjs.js"
26
+ },
27
+ "dependencies": {
28
+ "@eslint/js": "^10.0.1",
29
+ "eslint-config-prettier": "^10.1.8",
30
+ "eslint-plugin-react-hooks": "^7.1.1",
31
+ "eslint-plugin-react-refresh": "^0.5.8",
32
+ "globals": "^17.14.0",
33
+ "typescript-eslint": "^8.73.0"
34
+ },
35
+ "peerDependencies": {
36
+ "eslint": "^10.0.0",
37
+ "typescript": ">=5.8.0 <6.1.0"
38
+ },
39
+ "devDependencies": {
40
+ "@stardustsorcery/tsconfig": "0.2.0",
41
+ "eslint": "^10.15.0",
42
+ "typescript": "^6.0.3"
43
+ },
44
+ "scripts": {
45
+ "lint": "eslint .",
46
+ "typecheck": "tsc --noEmit"
47
+ }
6
48
  }
package/react.js ADDED
@@ -0,0 +1,15 @@
1
+ // @ts-check
2
+ import {defineConfig} from 'eslint/config';
3
+ import reactHooks from 'eslint-plugin-react-hooks';
4
+ import globals from 'globals';
5
+ import {baseConfig} from './base.js';
6
+
7
+ export const reactConfig = defineConfig(
8
+ ...baseConfig,
9
+ {
10
+ languageOptions: {
11
+ globals: globals.browser,
12
+ },
13
+ },
14
+ reactHooks.configs.flat.recommended,
15
+ );
package/vite-react.js ADDED
@@ -0,0 +1,9 @@
1
+ // @ts-check
2
+ import {defineConfig} from 'eslint/config';
3
+ import reactRefresh from 'eslint-plugin-react-refresh';
4
+ import {reactConfig} from './react.js';
5
+
6
+ export const viteReactConfig = defineConfig(
7
+ ...reactConfig,
8
+ reactRefresh.configs.vite,
9
+ );
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.