Skip to content

Commit 4904a96

Browse files
committed
refactor: rename rule match-with-fex as folder-match-with-fex
1 parent eee98ef commit 4904a96

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# eslint-plugin-check-folder
1+
# eslint-plugin-check-file
22

33
Allows you to enforce a consistent naming pattern for the folder of the specified file.
44

@@ -11,20 +11,20 @@ npm i eslint --save-dev
1111
```
1212

1313
Next, install
14-
`eslint-plugin-check-folder`:
14+
`eslint-plugin-check-file`:
1515

1616
```sh
17-
npm install eslint-plugin-check-folder --save-dev
17+
npm install eslint-plugin-check-file --save-dev
1818
```
1919

2020
## Usage
2121

22-
Add `check-folder` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
22+
Add `check-file` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
2323

2424
```json
2525
{
2626
"plugins": [
27-
"check-folder"
27+
"check-file"
2828
]
2929
}
3030
```
@@ -35,7 +35,7 @@ Then configure the rules you want to use under the rules section.
3535
```json
3636
{
3737
"rules":{
38-
"check-folder/match-with-fex":[
38+
"check-file/folder-match-with-fex":[
3939
"error",
4040
{
4141
"*.test.{js,jsx,ts,tsx}":"**/__tests__/",
@@ -48,6 +48,6 @@ Then configure the rules you want to use under the rules section.
4848

4949
## Supported Rules
5050

51-
- [check-folder/match-with-fex](docs/rules/match-with-fex.md): Enforce a consistent naming pattern for the folder of the specified file
51+
- [check-file/folder-match-with-fex](docs/rules/folder-match-with-fex.md): Enforce a consistent naming pattern for the folder of the specified file
5252

5353

docs/rules/match-with-fex.md renamed to docs/rules/folder-match-with-fex.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# The folder should match the naming pattern specified by the file extension (match-with-fex)
1+
# The folder should match the naming pattern specified by the file extension (folder-match-with-fex)
22

33
Allows you to enforce a consistent naming pattern for the folder of the specified file.
44

@@ -9,7 +9,7 @@ This rule aims to format the folder of the specified file. This rule uses the gl
99
If the rule had been set as follows:
1010
```js
1111
...
12-
'check-folder/match-with-fex': ['error', {'*.test.js': '**/__tests__/'}],
12+
'check-file/folder-match-with-fex': ['error', {'*.test.js': '**/__tests__/'}],
1313
...
1414
```
1515

@@ -29,10 +29,10 @@ You need to specify a different naming pattern for different file extensions. Th
2929
```js
3030
module.exports = {
3131
plugins: [
32-
'check-folder',
32+
'check-file',
3333
],
3434
rules: {
35-
'check-folder/match-with-fex': ['error', {
35+
'check-file/folder-match-with-fex': ['error', {
3636
'*.test.{js,jsx,ts,tsx}': '**/__tests__/',
3737
'*.styled.{jsx,tsx}': '**/pages/',
3838
}],

lib/rules/match-with-fex.js renamed to lib/rules/folder-match-with-fex.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = {
1818
'The folder should match the naming pattern specified by the file extension',
1919
category: 'Layout & Formatting',
2020
recommended: false,
21-
url: 'https://github.com/DukeLuo/eslint-plugin-check-folder/blob/main/docs/rules/match-with-fex.md',
21+
url: 'https://github.com/DukeLuo/eslint-plugin-check-file/blob/main/docs/rules/folder-match-with-fex.md',
2222
},
2323
fixable: null,
2424
schema: [

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "eslint-plugin-check-folder",
2+
"name": "eslint-plugin-check-file",
33
"version": "0.0.0",
44
"description": "Check the file folder",
55
"keywords": [

tests/lib/rules/match-with-fex.js renamed to tests/lib/rules/folder-match-with-fex.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55
'use strict';
66

7-
const rule = require('../../../lib/rules/match-with-fex');
7+
const rule = require('../../../lib/rules/folder-match-with-fex');
88
const RuleTester = require('eslint').RuleTester;
99

1010
const ruleTester = new RuleTester();

0 commit comments

Comments
 (0)