@tomjs/eslint
TypeScript icon, indicating that this package has built-in type declarations

4.1.0 • Public • Published

@tomjs/eslint

npm node-current (scoped) NPM

English | 中文

Front-end project eslint js/ts/node/vue/react code style specification configuration, node>=18.18 is recommended.

Usage

  • Install dependencies
pnpm add -D eslint prettier @tomjs/eslint
  • Modify the eslint.config.{js,cjs,mjs} configuration as needed, such as

  • 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];
  • Supports ts, js, node, node/js, vue, vue/js, vue2, vue2/js, react, react/jsbrowserbrowser/js configurations.

Configuration

node

node project configuration, inherits ts

Modify eslint.config.cjs configuration, such as

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

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

vue

vue project configuration, inherits ts

Modify eslint.config.cjs configuration, such as

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

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

react

react project configuration, inherits ts

Modify eslint.config.cjs configuration, such as

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

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

Version Dependencies

@tomjs/eslint eslint node
>=4 ^9.7.0 ^18.18.0 || ^20.9.0 || >=21.1.0
3 ^8.7.0 ^18.18.0 || >=20.0.0

Package Sidebar

Install

npm i @tomjs/eslint

Weekly Downloads

11

Version

4.1.0

License

MIT

Unpacked Size

32.3 kB

Total Files

60

Last publish

Collaborators

  • tomgao365