@viclafouch/eslint-config-viclafouch 4.22.1-beta.7 → 4.22.1-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/prettier.mjs +5 -1
- package/rules/typescript.mjs +7 -0
package/README.md
CHANGED
package/package.json
CHANGED
package/prettier.mjs
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'
|
|
2
|
+
|
|
1
3
|
import eslintConfigPrettier from 'eslint-config-prettier'
|
|
2
4
|
import eslintPluginPrettier from 'eslint-plugin-prettier'
|
|
3
5
|
|
|
6
|
+
const require = createRequire(import.meta.url)
|
|
7
|
+
|
|
4
8
|
/**
|
|
5
9
|
* @type {import("eslint").Linter.Config}
|
|
6
10
|
*/
|
|
@@ -15,7 +19,7 @@ export default [
|
|
|
15
19
|
'prettier/prettier': [
|
|
16
20
|
'error',
|
|
17
21
|
{
|
|
18
|
-
plugins: ['prettier-plugin-curly'],
|
|
22
|
+
plugins: [require.resolve('prettier-plugin-curly')],
|
|
19
23
|
semi: false,
|
|
20
24
|
singleQuote: true,
|
|
21
25
|
printWidth: 80,
|
package/rules/typescript.mjs
CHANGED
|
@@ -997,9 +997,16 @@ export default defineConfig(
|
|
|
997
997
|
],
|
|
998
998
|
|
|
999
999
|
// Naming convention for type parameters
|
|
1000
|
+
// Enforce naming conventions for variables, functions, types, and type parameters
|
|
1000
1001
|
// https://typescript-eslint.io/rules/naming-convention
|
|
1001
1002
|
'@typescript-eslint/naming-convention': [
|
|
1002
1003
|
'error',
|
|
1004
|
+
{
|
|
1005
|
+
selector: 'variable',
|
|
1006
|
+
format: ['camelCase', 'PascalCase', 'UPPER_CASE']
|
|
1007
|
+
},
|
|
1008
|
+
{ selector: 'function', format: ['camelCase', 'PascalCase'] },
|
|
1009
|
+
{ selector: 'typeLike', format: ['PascalCase'] },
|
|
1003
1010
|
{
|
|
1004
1011
|
selector: 'typeParameter',
|
|
1005
1012
|
format: ['PascalCase'],
|