ESLint plugin
This project is maintained by iliubinskii
ESLint plugin / match-filename
Requires that AST element matches filename.
module.exports = {
plugins: ["misc"],
rules: {
"misc/match-filename": [
"error",
{
format: "camelCase" | "kebab-case" | "PascalCase",
prefix: string,
selector: string | string[],
suffix: string
}
]
}
};
| Option | Description | Default | | :—– | :———- | :—— |
format |
Format | - |
prefix |
Prefix | "" |
selector |
AST selector | - |
suffix |
Suffix | "" |
/*
eslint misc/match-filename: [
error,
{
disallow: "source1"
}
]
*/
import * as source1 from "source1";
/*
eslint misc/match-filename: [
error,
{
disallow: "source1"
}
]
*/
import * as source2 from "source2";