Skip to content

Commit 51bc7ca

Browse files
committed
build: updated eslint rules
1 parent 4c15d4d commit 51bc7ca

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

packages/eslint-config/eslint-config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,30 @@ module.exports = {
149149
"no-self-assign": "error",
150150
"no-unused-labels": "error",
151151
"no-useless-catch": "error",
152+
"quotes": "off",
152153
"@typescript-eslint/quotes": [ "error", "double", {
153154
allowTemplateLiterals: true,
154155
avoidEscape: true
155156
} ],
157+
"semi": "off",
156158
"@typescript-eslint/semi": [ "error", "always" ],
159+
"space-before-blocks": "off",
157160
"@typescript-eslint/space-before-blocks": "error",
161+
"space-infix-ops": "off",
158162
"@typescript-eslint/space-infix-ops": "error",
163+
"keyword-spacing": "off",
159164
"@typescript-eslint/keyword-spacing": "error",
165+
"no-useless-constructor": "off",
160166
"@typescript-eslint/no-useless-constructor": "error",
167+
"no-extra-semi": "off",
161168
"@typescript-eslint/no-extra-semi": "error",
169+
"no-empty-function": "off",
162170
"@typescript-eslint/no-empty-function": "error",
171+
"no-throw-literal": "off",
163172
"@typescript-eslint/no-throw-literal": "error",
173+
"no-unused-expressions": "off",
164174
"@typescript-eslint/no-unused-expressions": "error",
175+
"no-magic-numbers": "off",
176+
"@typescript-eslint/no-magic-numbers": "error"
165177
}
166178
};
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { getEntry } from "../common/getEntry";
22

3-
const getFixedName = (name: string): string => (name && name.startsWith(".") ? name.substring(1) : name || "");
4-
5-
const getBundleEntry = (name: string, bundle: boolean): unknown => getEntry("", getFixedName(name), bundle);
3+
const skipFirstDotPosition = 1,
4+
getFixedName = (name: string): string =>
5+
name && name.startsWith(".") ? name.substring(skipFirstDotPosition) : name || "",
6+
getBundleEntry = (name: string, bundle: boolean): unknown => getEntry("", getFixedName(name), bundle);
67

78
export { getBundleEntry };

0 commit comments

Comments
 (0)