Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-plugin-filenames-simple

epaew99kMIT0.9.0TypeScript support: included

An ESLint plugin to check filenames with simple configuration

eslint, eslintPlugin, eslint-plugin, file, filename, simple

readme

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

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

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

    npm run eslint --ext .js .
    # or
    yarn run eslint --ext .js .

Available rules

CHANGELOG

CHANGELOG

LICENSE

MIT

changelog

Unreleased

Features

Bugfixes

Others

0.9.0

Features

  • #675
    • Update package.json - work with Node.js v20 (or later)

Bugfixes

Others

0.8.0

Features

  • #600
    • Remove support Node.js < 14.17
    • Add support for Node.js 18.x

Others

  • #465
    • Update prettier configuration.
  • #598
  • #601
    • Upgrade some dependencies

0.7.0

Features

  • #416
    • Remove support for ESLint 6.x and Node.js < 12.22
    • Add support for ESLint 8.x and Node.js 16.x

0.6.0

Features

  • #199 Add new rule typescript-module-declaration.
  • #202
    • Deprecates the rule extname
    • Add new rule extension

Bugfixes

  • #198 False positive detection of ExportNamedDeclaration in TSModuleBlock. (Mixed in #196)
  • #200 Fix the message of the rule named-export reports.

Others

  • #196 Refactor rules/named-export to use context.getDeclaredVariables().

0.5.0

Bugfixes

  • #156 False positives when exported name does not strictly follow PascalCase.
  • #158 Fixup the behavior of utils/split-name when the specific PascalCased name is given.

Others

  • #51 Use core-js as replacement of my own polyfill implementation.
  • #147 Refactor utils/pluralize: Remove dependency on eslint package.
  • #149 Refactoring: Replace utils/preset-cases with utils/preset-rules.
  • #148 Refactoring: Add utils/case-validator to reduce complexity of rules/naming-convention.

0.4.0

Features

  • #12 Add new rule pluralize
  • #37 Add options for the rule named-export to limit the filenames to which this rule applies.
  • #38 Change where to get the dictionaries for the rule pluralize.
  • #47 Update option of rule named-export in configs.recommended

0.3.1

Bugfixes

  • #27 Fixed the behavior that ESLint execution fails when the lint target includes TypeScript notation and the rule named-export is enabled.
  • #30
    • Fixed false positives when statement contains both default export and single named export.
    • Fixed false positives when statement contains both all export (export *) and single named export.

0.3.0

Features

  • #9 Add new rule no-index
  • #21 Add new rule named-export

Others

  • #10 Add CHANGELOG.md
  • #17 Update package keywords
  • Generate type declaration files

0.2.0

Features

  • [Caution] #2 Rename rule casing to naming-convention
  • #4 Add rule extname
  • #5 Add rule presets

Bugfixes

  • #3 Fixup suggested filename in error message

Others

  • #1 Fixup required version of Node.js and ESLint

0.1.1

Others

  • Fixup package metadata

0.1.0

Initial release