@aneuhold/eslint-config 1.0.116 → 1.1.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/README.md CHANGED
@@ -5,7 +5,7 @@ Personal ESLint Configuration
5
5
  ## Notes on Architecture
6
6
 
7
7
  - TypeScript was specifically avoided in this library because it was complicating the build step. It might work in this repo, but it kept causing issues in consuming repos. JS by itself seems to work great.
8
- - All dependencies should be able to be only defined in this repo outside of ESLint and Prettier, as those will be brought in to consuming repos.
8
+ - All dependencies should be able to be only defined in this repo outside of ESLint and Prettier, as those will be brought in to consuming repos as peer deps.
9
9
  - In order for there not to be crossover between configuration dependencies, each config should be brought in as the full path to the configuration. For example:
10
10
 
11
11
  ```js
@@ -18,7 +18,7 @@ Make sure to add the following settings to VSCode settings.json:
18
18
 
19
19
  ```json
20
20
  {
21
- "eslint.experimental.useFlatConfig": true,
21
+ "eslint.useFlatConfig": true,
22
22
  "eslint.run": "onSave",
23
23
  "eslint.format.enable": true,
24
24
  // Extra setting below specifically for svelte
@@ -26,17 +26,6 @@ Make sure to add the following settings to VSCode settings.json:
26
26
  }
27
27
  ```
28
28
 
29
- Also as of 5/26/2024 make sure to add a resolution for Globals until that is fixed in other packages:
30
-
31
- ```json
32
- "resolutions": {
33
- "globals": "^15.3.0"
34
- },
35
- "resolutionsComments": {
36
- "globals": "This is a temporary fix for the globals package due to this issue: https://github.com/eslint/eslint/discussions/17868. Once other packages pull 15+ then should be able to remove this"
37
- }
38
- ```
39
-
40
29
  ### Setup for `CommonJS`
41
30
 
42
31
  Add `eslint.config.js` like so:
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@aneuhold/eslint-config",
3
- "version": "1.0.116",
3
+ "version": "1.1.0",
4
4
  "description": "Main ESLint Configuration for personal projects",
5
5
  "main": "./src/ts-lib-config.js",
6
6
  "packageManager": "yarn@4.9.2",
7
7
  "scripts": {
8
+ "dev": "nodemon -e js --exec \"local-npm publish\"",
8
9
  "pushpub": "npm version patch && git push",
9
10
  "upgrade:all": "yarn upgrade --latest",
10
11
  "lint": "yarn eslint"
@@ -16,7 +17,8 @@
16
17
  },
17
18
  "keywords": [
18
19
  "eslint",
19
- "eslintconfig"
20
+ "eslintconfig",
21
+ "prettier"
20
22
  ],
21
23
  "author": "Anton G. Neuhold Jr.",
22
24
  "license": "MIT",
@@ -28,7 +30,8 @@
28
30
  "src/**/*"
29
31
  ],
30
32
  "peerDependencies": {
31
- "eslint": ">= 9.33.0"
33
+ "eslint": ">= 9.33.0",
34
+ "prettier": ">= 3.6.2"
32
35
  },
33
36
  "dependencies": {
34
37
  "@eslint/js": "^9.33.0",
@@ -42,12 +45,16 @@
42
45
  "eslint-plugin-jsdoc": "^54.0.0",
43
46
  "eslint-plugin-prefer-arrow": "^1.2.3",
44
47
  "eslint-plugin-prettier": "^5.5.4",
48
+ "eslint-plugin-react-hooks": "^5.2.0",
49
+ "eslint-plugin-react-refresh": "^0.4.20",
45
50
  "eslint-plugin-svelte": "^3.11.0",
46
51
  "eslint-plugin-unused-imports": "^4.1.4",
52
+ "globals": "^16.3.0",
47
53
  "prettier-plugin-svelte": "^3.4.0",
48
54
  "typescript-eslint": "^8.39.1"
49
55
  },
50
56
  "devDependencies": {
57
+ "@aneuhold/local-npm-registry": "^0.2.11",
51
58
  "@types/node": "^22.17.1",
52
59
  "eslint": "^9.33.0",
53
60
  "prettier": "^3.6.2",
@@ -0,0 +1,35 @@
1
+ import js from '@eslint/js';
2
+ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
3
+ import reactHooks from 'eslint-plugin-react-hooks';
4
+ import reactRefresh from 'eslint-plugin-react-refresh';
5
+ import { defineConfig } from 'eslint/config';
6
+ import globals from 'globals';
7
+ import tseslint from 'typescript-eslint';
8
+
9
+ export default defineConfig([
10
+ {
11
+ files: ['**/*.{js,jsx,ts,tsx}'],
12
+ extends: [
13
+ js.configs.recommended,
14
+ tseslint.configs.recommended,
15
+ reactHooks.configs['recommended-latest'],
16
+ reactRefresh.configs.vite,
17
+ eslintPluginPrettierRecommended
18
+ ],
19
+ languageOptions: {
20
+ ecmaVersion: 2020,
21
+ globals: globals.browser,
22
+ parserOptions: {
23
+ ecmaVersion: 'latest',
24
+ ecmaFeatures: { jsx: true },
25
+ sourceType: 'module'
26
+ }
27
+ },
28
+ rules: {
29
+ 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }]
30
+ }
31
+ },
32
+ {
33
+ ignores: ['.yarn', 'build', 'dist', 'node_modules', '**/.DS_Store']
34
+ }
35
+ ]);