项目作者: epaew

项目描述 :
An ESLint plugin to check filenames with simple configuration
高级语言: TypeScript
项目地址: git://github.com/epaew/eslint-plugin-filenames-simple.git
创建时间: 2020-05-28T23:58:24Z
项目社区:https://github.com/epaew/eslint-plugin-filenames-simple

开源协议:MIT License

下载


ESLint plugin filenames simple

npm version
Build Status
Maintainability
Test Coverage

An ESLint plugin to check filenames with simple configuration.
This plugin is inspired by eslint-plugin-filenames.

Requirements

  • Node.js: >= 14.17
    • Unstable versions of Node.js are not actively supported.
  • ESLint: 7.x, 8.x

Getting started

  1. Install ESLint and this plugin via npm/yarn

    1. npm i --save-dev eslint eslint-plugin-filenames-simple
    2. # or
    3. yarn add -D eslint eslint-plugin-filenames-simple
  2. Modify your .eslintrc file to load the plugin and enable the rules.

    1. // select one of the following
    2. {
    3. "extends": [
    4. "plugin:filenames-simple/recommended" // for pure ECMAScript/TypeScript project
    5. "plugin:filenames-simple/recommended-react" // for React.js project
    6. "plugin:filenames-simple/recommended-vue" // for Vue.js project
    7. ]
    8. }
    1. // or configure manually
    2. {
    3. "plugins": [
    4. "filenames-simple"
    5. ],
    6. "rules": {
    7. "filenames-simple/extension": "error",
    8. "filenames-simple/naming-convention": ["error", { "rule": "kebab-case" }]
    9. }
    10. }
  3. Run ESLint and lint your codes.

    1. npm run eslint --ext .js .
    2. # or
    3. yarn run eslint --ext .js .

Available rules

CHANGELOG

CHANGELOG

LICENSE

MIT