![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@kouts/eslint-config
Advanced tools
Custom ESLint and Prettier config with Vue.js support and sensible defaults
[!NOTE]
Starting from v1, this ESLint config uses the ESLint Flat config and is only compatible with ESLint v9 or v8.50.0+.
If you're looking for the previous version, checkout the README here.
pnpm i -D @kouts/eslint-config eslint prettier
Add an eslint.config.js
(or eslint.config.cjs
if your project is CommonJS) that imports the config
function:
import { config } from '@kouts/eslint-config'
export default [
...config(),
{
// Add custom rules here
}
]
You can customize the config by passing an object to the config
function:
config({
ts: true,
vue: true
vueVersion: 3
})
Available options:
Option | Type | Description | Default |
---|---|---|---|
ts | boolean | Enable TypeScript support | true |
vue | boolean | Enable Vue.js support | true |
vueVersion | 2 or 3 | Specify the version of Vue.js | 3 |
Create a prettier.config.js
file with the following content:
import prettierConfig from '@kouts/eslint-config/prettier'
export default prettierConfig
Add the following ESLint commands to your .package-json
for linting and autofixing:
{
"lint": "eslint \"**/*.{vue,ts,js}\"",
"lint-fix": "eslint --fix \"**/*.{vue,ts,js}\""
}
Ad the following settings to your VS Code project settings for autofix on save:
.vscode/settings.json
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
eslint --fix
FAQs
Kouts's ESLint config
The npm package @kouts/eslint-config receives a total of 113 weekly downloads. As such, @kouts/eslint-config popularity was classified as not popular.
We found that @kouts/eslint-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.