https://github.com/epaew/eslint-plugin-filenames-simple
An ESLint plugin to check filenames with simple configuration
https://github.com/epaew/eslint-plugin-filenames-simple
ecmascript eslint eslint-plugin filename javascript naming-conventions simple typescript
Last synced: 8 months ago
JSON representation
An ESLint plugin to check filenames with simple configuration
- Host: GitHub
- URL: https://github.com/epaew/eslint-plugin-filenames-simple
- Owner: epaew
- License: mit
- Created: 2020-05-28T23:58:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-17T10:19:46.000Z (almost 2 years ago)
- Last Synced: 2024-12-15T05:46:18.172Z (about 1 year ago)
- Topics: ecmascript, eslint, eslint-plugin, filename, javascript, naming-conventions, simple, typescript
- Language: TypeScript
- Homepage:
- Size: 1.52 MB
- Stars: 50
- Watchers: 3
- Forks: 5
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# ESLint plugin filenames simple
[](https://badge.fury.io/js/eslint-plugin-filenames-simple)
[](https://github.com/epaew/eslint-plugin-filenames-simple/actions?query=workflow%3A%22Run+Jest%22+branch%3A%22master%22)
[](https://codeclimate.com/github/epaew/eslint-plugin-filenames-simple/maintainability)
[](https://codeclimate.com/github/epaew/eslint-plugin-filenames-simple/test_coverage)
An ESLint plugin to check filenames with simple configuration.
This plugin is inspired by [eslint-plugin-filenames](https://github.com/selaux/eslint-plugin-filenames).
## Requirements
- [Node.js](https://nodejs.org/en/download/): >= 14.17
- Unstable versions of Node.js are not actively supported.
- [ESLint](https://eslint.org/): 7.x, 8.x
## Getting started
1. Install ESLint and this plugin via npm/yarn
- https://eslint.org/docs/user-guide/getting-started#installation-and-usage
```sh
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.
```javascript
// 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
]
}
```
```javascript
// 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.
```sh
npm run eslint --ext .js .
# or
yarn run eslint --ext .js .
```
## Available rules
- [extension](./docs/rules/extension.md)
- [named-export](./docs/rules/named-export.md)
- [naming-convention](./docs/rules/naming-convention.md)
- [no-index](./docs/rules/no-index.md)
- [pluralize](./docs/rules/pluralize.md)
- [typescript-module-declaration](./docs/rules/typescript-module-declaration.md)
## CHANGELOG
[CHANGELOG](./CHANGELOG.md)
## LICENSE
[MIT](./LICENSE)