This package provides ESLint's shared config that designed to be strict as hell.
Install required packages:
npm install eslint-config-greenpie oxlint typescript-eslint --save-dev
Then add the following code to your local .oxlintrc.json
file:
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"extends": [
"./node_modules/eslint-config-greenpie/configs/oxlintrc.jsonc"
]
}
And the following code to eslint.config.js
file:
import tsEslint from 'typescript-eslint';
import { configs } from 'eslint-config-greenpie';
export default tsEslint.config(
...configs.default,
...configs.vue
);
or see more examples below.
Config | Description |
---|---|
default |
Includes js and ts configs |
js |
Includes JavaScript rules |
ts |
Includes TypeScript rules |
vue |
Includes rules for Vue.js |
Oxlint has one unified configuration for all supported languages (.js
, .ts
, .vue
). You can granually configure it in your local .oxlintrc.json
file.
Related ESLint rules are disabled by default if supported by oxlint.
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"extends": [
"./node_modules/eslint-config-greenpie/configs/oxlintrc.jsonc"
],
"rules": {
"eslint/no-magic-numbers": "off",
},
"overrides": [{
"files": ["src/**/*.{ts,vue}"],
"env": {
"browser": true
}
}, {
"files": ["vite.config.mts"],
"env": {
"node": true
}
}]
}
import { configs } from 'eslint-config-greenpie';
export default [
...configs.js
];
import { configs } from 'eslint-config-greenpie';
export default [
...configs.js,
...configs.vue
];
You will probably need to configure another parser for the <script>
tag.
import { configs } from 'eslint-config-greenpie';
export default [
...configs.default,
...configs.vue
];