1.0.3 • Published 3 years ago

fe-config-nowcoder v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

fe-config-nowcoder

用于导出牛客前端项目常用的eslint、tsconfig配置信息

使用

安装

npm i xxxx --save-dev
yarn add xxxx -D

in .eslintrc.js

module.exports = {
    extends: [
        require.resolve('fe-config-nowcoder/dist/eslint')
    ]
}

in tsconfig.json

{
    "extends": "./node_modules/fe-config-nowcoder/dist/tsconfig.json"
}   

说明

  • 在eslint配置中,'prettier/prettier'规则,只有在非 NODE_ENV === 'production'时才生效
  • 'no-debugger'规则,只有在 NODE_ENV === 'production' 时才生效