2.0.0 • Published 2 years ago

@lfire/eslint-config-lib v2.0.0

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

@lfire/eslint-config-lib

npm i -D @lfire/eslint-config-lib

依赖于 eslint-config-alloy

配置:.eslintrc.js

module.exports = {
  root: true,
  extends: ['@lfire/eslint-config-lib'],
};

默认 JS 项目配置

支持 TS:

module.exports = {
  root: true,
  extends: ['@lfire/eslint-config-lib/ts'],
  parserOptions: {
    tsconfigRootDir: __dirname,
  },
};

支持 Vue:

当前支持 Vue3.x,如若要支持 Vue2.x,请安装 @lfire/eslint-config-lib@1

module.exports = {
  root: true,
  extends: ['@lfire/eslint-config-lib/vue'],
};

支持 Vue TS 版:

module.exports = {
  root: true,
  extends: ['@lfire/eslint-config-lib/vue-ts'],
  parserOptions: {
    tsconfigRootDir: __dirname,
  },
};

支持 React:

module.exports = {
  root: true,
  extends: ['@lfire/eslint-config-lib/react'],
  parserOptions: {
    tsconfigRootDir: __dirname,
  },
};

支持 React TS 版:

module.exports = {
  root: true,
  extends: ['@lfire/eslint-config-lib/react-ts'],
  parserOptions: {
    tsconfigRootDir: __dirname,
  },
};
2.0.0

2 years ago

1.0.0

2 years ago