4.4.0 • Published 4 months ago

@tomjs/eslint v4.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

@tomjs/eslint

npm node-current (scoped) NPM

English | 中文

前端项目 eslint js/ts/node/vue/react 代码风格规范配置,推荐 node>=18.18

使用

  • 安装依赖
pnpm add -D eslint prettier @tomjs/eslint
  • 根据需要修改 eslint.config.{js,cjs,mjs} 配置,如

  • eslint.config.cjs

const eslint = require('@tomjs/eslint');

module.exports = [...eslint.configs.ts];
  • eslint.config.mjs
import eslint from '@tomjs/eslint/ts';

export default [...eslint];
  • 支持 tsjsnodenode/jsvuevue/jsvue2vue2/jsreactreact/jsbrowserbrowser/js 配置。

配置

node

node 项目配置,继承 ts

修改 eslint.config.cjs 配置,如

const eslint = require('@tomjs/eslint');

module.exports = [...eslint.configs.node];

vue

vue 项目配置,继承 ts 配置

修改 eslint.config.cjs 配置,如

const eslint = require('@tomjs/eslint');

module.exports = [...eslint.configs.vue];

react

react 项目配置,继承 ts

修改 eslint.config.cjs 配置,如

const eslint = require('@tomjs/eslint');

module.exports = [...eslint.configs.react];

版本依赖

@tomjs/eslinteslintnode
>=4^9.7.0^18.18.0 || ^20.9.0 || >=21.1.0
3^8.7.0^18.18.0 || >=20.0.0
4.4.0

4 months ago

4.3.0

4 months ago

4.2.0

4 months ago

4.1.0

7 months ago

4.0.1

7 months ago

4.0.0

7 months ago

4.0.2

7 months ago

3.3.0

1 year ago

3.2.0

1 year ago

3.1.1

1 year ago

3.1.0

1 year ago

3.0.1

1 year ago

2.4.0

1 year ago

3.0.0

1 year ago

2.3.1

1 year ago

2.3.0

1 year ago

2.2.0

1 year ago

2.1.0

1 year ago

1.6.1

1 year ago

1.6.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.2

1 year ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago