1.0.41 • Published 8 months ago
@aneuhold/eslint-config v1.0.41
eslint-config
Personal ESLint Configuration
Notes on Architecture
- 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.
- 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.
- 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:
import tsLibConfig from '@aneuhold/eslint-config/src/ts-lib-config.js';
Usage
Make sure to add the following settings to VSCode settings.json:
{
"eslint.experimental.useFlatConfig": true,
"eslint.run": "onSave",
"eslint.format.enable": true,
// Extra setting below specifically for svelte
"eslint.validate": ["svelte"]
}
Also as of 5/26/2024 make sure to add a resolution for Globals until that is fixed in other packages:
"resolutions": {
"globals": "^15.3.0"
},
"resolutionsComments": {
"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"
}
Setup for CommonJS
Add eslint.config.js
like so:
const config = (async () => (await import('./eslint.config.mjs')).default)();
module.exports = config;
Add eslint.config.mjs
like so:
// @ts-check
import tsLibConfig from '@aneuhold/eslint-config/src/ts-lib-config.js';
/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigArray} */
export default [
...tsLibConfig,
{
// other override settings. e.g. for `files: ['**/*.test.*']`
}
];
Setup for ESNext
(ES Modules)
Add eslint.config.js
like so:
// @ts-check
import svelteConfig from '@aneuhold/eslint-config/src/svelte-config.js';
/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigArray} */
export default [
...svelteConfig,
{
// other override settings. e.g. for `files: ['**/*.test.*']`
}
];
1.0.41
8 months ago
1.0.39
9 months ago
1.0.38
9 months ago
1.0.40
9 months ago
1.0.37
9 months ago
1.0.36
9 months ago
1.0.33
9 months ago
1.0.35
9 months ago
1.0.34
9 months ago
1.0.29
10 months ago
1.0.28
10 months ago
1.0.32
10 months ago
1.0.31
10 months ago
1.0.30
10 months ago
1.0.19
1 year ago
1.0.18
1 year ago
1.0.17
1 year ago
1.0.16
1 year ago
1.0.9
1 year ago
1.0.8
1 year ago
1.0.7
1 year ago
1.0.22
12 months ago
1.0.21
12 months ago
1.0.20
12 months ago
1.0.26
11 months ago
1.0.25
11 months ago
1.0.24
11 months ago
1.0.23
12 months ago
1.0.27
11 months ago
1.0.11
1 year ago
1.0.10
1 year ago
1.0.14
1 year ago
1.0.13
1 year ago
1.0.12
1 year ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago