1 Star 2 Fork 0

klmahua/lx-music-mobile

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.eslintrc.cjs 2.34 KB
一键复制 编辑 原始数据 按行查看 历史
lyswhut 提交于 2023-08-30 14:34 . code lint
const baseRule = {
'no-new': 'off',
camelcase: 'off',
'no-return-assign': 'off',
'space-before-function-paren': ['error', 'never'],
'no-var': 'error',
'no-fallthrough': 'off',
eqeqeq: 'off',
'require-atomic-updates': ['error', { allowProperties: true }],
'no-multiple-empty-lines': [1, { max: 2 }],
'comma-dangle': [2, 'always-multiline'],
'standard/no-callback-literal': 'off',
'prefer-const': 'off',
'no-labels': 'off',
'node/no-callback-literal': 'off',
'multiline-ternary': 'off',
'react/display-name': 'off',
'react/prop-types': 'off',
}
module.exports = {
root: true,
extends: [
'standard',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:react/jsx-runtime',
],
plugins: [
'react',
],
rules: baseRule,
parser: '@babel/eslint-parser',
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: ['standard-with-typescript'],
rules: {
...baseRule,
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/space-before-function-paren': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/restrict-template-expressions': [
1,
{
allowBoolean: true,
},
],
'@typescript-eslint/no-misused-promises': [
'error',
{
checksVoidReturn: {
arguments: false,
attributes: false,
},
},
],
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/return-await': 'off',
'@typescript-eslint/comma-dangle': 'off',
'@typescript-eslint/no-dynamic-delete': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
},
parserOptions: {
project: './tsconfig.json',
},
},
],
settings: {
react: {
version: 'detect', // React version. "detect" automatically picks the version you have installed.
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
// It will default to "latest" and warn if missing, and to "detect" in the future
},
},
ignorePatterns: [
'node_modules',
'*.min.js',
'test.js',
'*Test.ts',
],
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/klmahuaw/lx-music-mobile.git
git@gitee.com:klmahuaw/lx-music-mobile.git
klmahuaw
lx-music-mobile
lx-music-mobile
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385