5.0.5 • Published 5 months ago
eslint-config-yyl-react v5.0.5
eslint-config-yyl-react
为 yyl-react 项目提供 eslint@9.x prettier@3.x 通用配置
install
# npm
npm i eslint-config-yyl-react --save-dev
# yarn
yarn add eslint-config-yyl-react --dev
依赖包
npm i typescript --save
npm i prettier@3 eslint@9 --save-dev
usage
prettier 配置
根目录新增 prettier.config.mjs
import prettierRule from 'eslint-config-yyl-react/prettier.config.mjs'
/** @type {import('prettier').Config} */
export default {
...prettierRule
}
根目录新增 .prettierignore
**/js/lib/**
**/__frag/**
**/__gitcase/**
.rpt2_cache
dist/**
**/dist/**
output/**
node_modules/**
*.yml
.gitignore
.prettierignore
yarn.lock
.npmignore
.**/*.map
package-lock.json
**/*.pug
**/*.png
**/*.jpg
**/*.bmp
**/*.jpeg
**/*.gif
**/*.pug**/*
**/*.sh
**/*.conf
**/__frag/*
.log
**/*.log
.DS_Store
**/.DS_Store
**/*.webp
eslint 配置
根目录新增 eslint.config.mjs
import yylReactConfig from 'eslint-config-yyl-react'
/** @type {import('eslint').Linter.Config[]} */
export default [
...yylReactConfig,
{
ignores: ['node_modules/*', 'output/*', 'test/*']
},
{
languageOptions: {
globals: {}
},
rules: {}
}
]
npm script 配置
修改 package.json
{
"scripts": {
"eslint": "eslint ./",
"prettier": "prettier --write ./"
}
}
5.0.5
5 months ago
3.0.4
5 months ago
3.0.3
5 months ago
3.0.2
5 months ago
3.0.1
5 months ago
3.0.0
5 months ago
2.1.0
2 years ago
2.0.0
3 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
0.2.1
4 years ago
0.2.0
4 years ago
0.1.9
5 years ago
0.1.8
5 years ago
0.1.7
5 years ago
0.1.6
5 years ago
0.1.5
5 years ago
0.1.4
5 years ago
0.1.3
5 years ago
0.1.2
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago