@stardust-configs/eslint-config
v0.12.1
Published
Shareable ESLint config
Downloads
364
Readme
@stardust-configs/eslint-config
Shareable ESLint config
Install
npm install eslint @stardust-configs/eslint-config -D
or
yarn add eslint @stardust-configs/eslint-config -D
Usage
Add environments and configs to .eslintrc.js
.
Environments
@stardust-configs/eslint-config/environments/browser
@stardust-configs/eslint-config/environments/node
@stardust-configs/eslint-config/environments/es5
@stardust-configs/eslint-config/environments/es6
@stardust-configs/eslint-config/environments/es2016
@stardust-configs/eslint-config/environments/es2017
@stardust-configs/eslint-config/environments/es2018
@stardust-configs/eslint-config/environments/es2019
@stardust-configs/eslint-config/environments/es2020
@stardust-configs/eslint-config/environments/es2021
@stardust-configs/eslint-config/environments/es2022
@stardust-configs/eslint-config/environments/es2023
@stardust-configs/eslint-config/environments/es2024
Configs
@stardust-configs/eslint-config/configs/typescript
@stardust-configs/eslint-config/configs/react
@stardust-configs/eslint-config/configs/tailwindcss
@stardust-configs/eslint-config/configs/next
@stardust-configs/eslint-config/configs/prettier
Presets
module.exports = {
extends: [
'@stardust-configs/eslint-config/environments/node',
'@stardust-configs/eslint-config/environments/es2023',
// Always write on the last line
'@stardust-configs/eslint-config/configs/prettier',
],
parserOptions: {
project: './tsconfig.json',
},
overrides: [
{
files: ['**/*.ts'],
extends: ['@stardust-configs/eslint-config/configs/typescript'],
},
],
}
module.exports = {
extends: [
'@stardust-configs/eslint-config/environments/browser',
'@stardust-configs/eslint-config/environments/node',
'@stardust-configs/eslint-config/environments/es2023',
// Always write on the last line
'@stardust-configs/eslint-config/configs/prettier',
],
parserOptions: {
project: './tsconfig.json',
},
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
extends: [
'@stardust-configs/eslint-config/configs/typescript',
'@stardust-configs/eslint-config/configs/react',
'@stardust-configs/eslint-config/configs/next',
],
},
],
}
VSCode integration
Install dbaeumer.vscode-eslint and add the following settings to your user settings or workspace settings.
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"]
}
Author
License
MIT