Skip to content
This repository was archived by the owner on Feb 19, 2024. It is now read-only.

Commit 0f2b7fe

Browse files
committed
feat: disallow named functions
BREAKING CHANGE: must convert all named functions to arrow functions
1 parent 5fe9b0d commit 0f2b7fe

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
parserOptions: {
44
project: './tsconfig.json',
55
},
6-
plugins: ['@typescript-eslint', 'unicorn'],
6+
plugins: ['@typescript-eslint', 'unicorn', 'prefer-arrow'],
77
extends: [
88
'eslint:recommended',
99
'plugin:@typescript-eslint/recommended',
@@ -56,7 +56,8 @@ module.exports = {
5656
'@typescript-eslint/explicit-module-boundary-types': ['error'],
5757
'prefer-promise-reject-errors': ['error'],
5858
'unicorn/prefer-string-slice': ['error'],
59-
'@typescript-eslint/switch-exhaustiveness-check': ['error']
59+
'@typescript-eslint/switch-exhaustiveness-check': ['error'],
60+
'prefer-arrow/prefer-arrow-functions': ['error'],
6061
},
6162
env: {
6263
browser: true,

package-lock.json

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"dependencies": {
2121
"@typescript-eslint/eslint-plugin": "5.56.0",
2222
"eslint-config-prettier": "8.8.0",
23+
"eslint-plugin-prefer-arrow": "1.2.3",
2324
"eslint-plugin-unicorn": "46.0.0"
2425
},
2526
"devDependencies": {

0 commit comments

Comments
 (0)