
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@ifanrx/eslint-config-standard-ts
Advanced tools
@ifanrx/eslint-config-standard-ts 仅针对 TypeScript 项目。
如果是 JavaScript 项目,请使用 @ifanrx/eslint-config-standard。
.eslintrc.js 配置文件的 extends 中,@ifanrx/standard-ts 总是放在最后一个。
parserOptions.project 自动配置@typescript-lint/parser 要求配置 .eslintrc.js 的 parserOptions.projecteslint-import-resolver-typescript,要求配置 tsconfig.json 的 compilerOptions.paths两者都已封装到 @ifanrx/eslint-config-standard-ts/init 和 @ifanrx/eslint-config-standard/init 提供的 init() 函数中。
使用时应将 .eslintrc.js 的配置传入 init() 函数中。
// .eslintrc.js
const {init} = require('@ifanrx/eslint-config-standard/init')
module.exports = init({
root: true,
extends: ['@ifanrx/standard'],
})
如果需要配置路径别名,应配置 tsconfig.json 的 compilerOptions.paths。
// tsconfig.json
{
"compilerOptions": {
"paths": {
"@/*": "./src/*"
}
}
}
pnpm install @ifanrx/eslint-config-standard-ts -D
// .eslintrc.js
module.exports = {
root: true,
extends: ['@ifanrx/standard-ts'],
}
pnpm install @ifanrx/eslint-config-standard-ts @ifanrx/eslint-config-standard-react -D
// .eslintrc.js
module.exports = {
root: true,
extends: ['@ifanrx/standard-react', '@ifanrx/standard-ts'],
}
pnpm install @ifanrx/eslint-config-standard-ts @ifanrx/eslint-config-standard-vue -D
module.exports = {
root: true,
extends: ['@ifanrx/standard-vue', '@ifanrx/standard-ts'],
}
pnpm install @ifanrx/eslint-config-standard-ts @ifanrx/eslint-config-standard-wxml -D
module.exports = {
root: true,
extends: ['@ifanrx/standard-wxml', '@ifanrx/standard-ts'],
}
FAQs
An ESLint shared standard configuration for TypeScript.
We found that @ifanrx/eslint-config-standard-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.