@codpoe/eslint-config
v1.0.4
Published
My eslint config
Downloads
17
Readme
@codpoe/eslint-config
Only eslint flat config system is supported.
Usage
Install
pnpm add -D eslint @codpoe/eslint-config
Config eslint.config.js
import { codpoeConfig } from '@codpoe/eslint-config';
export default codpoeConfig();
Add globals
import { codpoeConfig } from '@codpoe/eslint-config';
export default codpoeConfig({
globals: ['node', 'browser'],
});
Add globals for specific files
import { codpoeConfig, globals } from '@codpoe/eslint-config';
export default [
...codpoeConfig(),
{
files: ['**/*.node.js'],
languageOptions: {
globals: {
...globals.node,
},
},
},
{
files: ['**/*.browser.js'],
languageOptions: {
globals: {
...globals.browser,
},
},
},
];