@seolhun/eslint-config
v1.4.0
Published
Eslint configuration with prettier
Downloads
245
Maintainers
Readme
ESLint Configuration
This is an ESLint configuration package that you can use in your JavaScript or TypeScript projects.
Installation
To install this package, run the following command:
npm install --save-dev @seolhun/eslint-config eslint@8 @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier eslint-import-resolver-typescript eslint-plugin-eslint-plugin eslint-plugin-jsx-a11y eslint-plugin-perfectionist eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks
Using the ESLint Configuration
To use this configuration, create an .eslintrc.js
file in the root directory of your project, if you haven't already. Then, extend this configuration in the .eslintrc
file, like so:
// .eslintrc.js
module.exports = {
"extends": [
"@seolhun/eslint-config",
],
}
Using the Prettier Configuration
This package also includes a Prettier configuration that you can use in your project. To use it, create a prettier.config.js
file in the root directory of your project and extend this configuration, like so:
module.exports = require('@seolhun/eslint-config/prettier.config')
// or
module.exports = Object.assign(require('@seolhun/eslint-config/prettier.config'), {
// Your prettier config
})
Using the TypeScript Configuration
If you are using TypeScript in your project, you can extend your tsconfig.eslint.json
file from your tsconfig.json
file and customize it as necessary. Here is an example tsconfig.eslint.json
file:
{
"extends": "./tsconfig.json",
"include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
"exclude": ["node_modules"]
}
Make sure to update the file paths to match the structure of your project.
I hope this helps! Let me know if you have any further questions.