UNPKG

@denaro-config/eslint-config-check-file

Version:

前端工程化中的 eslint 通用配置, 提供校验、规范文件或文件夹命名, 一般适用于规范单元测试文件和存放单元测试的目录。

35 lines (29 loc) 723 B
/** @type {import('eslint').Linter.BaseConfig} */ // @ts-check module.exports = { $schema: 'https://json.schemastore.org/eslintrc.json', root: true, env: { browser: true, es6: true, es2021: true, node: true }, plugins: ['check-file'], rules: { 'check-file/filename-blocklist': [ 'error', { '**/*.model.ts': '*.models.ts', '**/*.util.ts': '*.utils.ts' } ], 'check-file/folder-match-with-fex': [ 'error', { '*.test.{js,jsx,ts,tsx}': '**/__tests__/', '*.styled.{jsx,tsx}': '**/pages/' } ] } }