Skip to content

Commit e29ee74

Browse files
committed
Remove eslint rules covered by dprint
1 parent bb3e2ea commit e29ee74

14 files changed

+1
-1008
lines changed

.eslintrc.json

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -128,34 +128,7 @@
128128

129129
// eslint-plugin-simple-import-sort
130130
"simple-import-sort/imports": "error",
131-
"simple-import-sort/exports": "error",
132-
133-
// Formatting rules; remove once a formatter enforces these.
134-
"@typescript-eslint/comma-dangle": ["error", "always-multiline"],
135-
"curly": ["error", "multi-line"],
136-
"linebreak-style": ["error", "windows"],
137-
"max-statements-per-line": ["error", { "max": 1 }],
138-
"new-parens": "error",
139-
"no-trailing-spaces": "error",
140-
"quote-props": ["error", "consistent-as-needed"],
141-
"space-in-parens": "error",
142-
"@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
143-
"@typescript-eslint/no-extra-semi": "error",
144-
"@typescript-eslint/quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
145-
"@typescript-eslint/semi": "error",
146-
"@typescript-eslint/space-before-function-paren": [
147-
"error",
148-
{
149-
"asyncArrow": "always",
150-
"anonymous": "always",
151-
"named": "never"
152-
}
153-
],
154-
"local/object-literal-surrounding-space": "error",
155-
"local/no-type-assertion-whitespace": "error",
156-
"local/type-operator-spacing": "error",
157-
"local/no-double-space": "error",
158-
"local/simple-indent": "error"
131+
"simple-import-sort/exports": "error"
159132
},
160133
"overrides": [
161134
// By default, the ESLint CLI only looks at .js files. But, it will also look at

scripts/eslint/rules/jsdoc-format.cjs

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ module.exports = createRule({
1212
internalCommentNotLastError: `@internal should only appear in final JSDoc comment for declaration.`,
1313
multipleJSDocError: `Declaration has multiple JSDoc comments.`,
1414
internalCommentOnParameterProperty: `@internal cannot appear on a JSDoc comment; use a declared property and an assignment in the constructor instead.`,
15-
misalignedJSDocComment: `This JSDoc comment is misaligned.`,
1615
},
1716
schema: [],
1817
type: "problem",
@@ -92,67 +91,7 @@ module.exports = createRule({
9291
}
9392
};
9493

95-
/** @type {(node: TSESTree.Node) => void} */
96-
const checkProgram = () => {
97-
const comments = sourceCode.getAllComments();
98-
99-
for (const c of comments) {
100-
if (c.type !== "Block") {
101-
continue;
102-
}
103-
104-
const rawComment = sourceCode.getText(c);
105-
if (!isJSDocText(rawComment)) {
106-
continue;
107-
}
108-
109-
const expected = c.loc.start.column + 2;
110-
const split = rawComment.split(/\r?\n/g);
111-
for (let i = 1; i < split.length; i++) {
112-
const line = split[i];
113-
const match = /^ *\*/.exec(line);
114-
if (!match) {
115-
continue;
116-
}
117-
118-
const actual = match[0].length;
119-
const diff = actual - expected;
120-
if (diff !== 0) {
121-
const line = c.loc.start.line + i;
122-
context.report({
123-
messageId: "misalignedJSDocComment",
124-
node: c,
125-
loc: {
126-
start: {
127-
line,
128-
column: 0,
129-
},
130-
end: {
131-
line,
132-
column: actual - 1,
133-
},
134-
},
135-
fix: fixer => {
136-
if (diff > 0) {
137-
// Too many
138-
const start = sourceCode.getIndexFromLoc({ line, column: expected - 1 });
139-
return fixer.removeRange([start, start + diff]);
140-
}
141-
else {
142-
// Too few
143-
const start = sourceCode.getIndexFromLoc({ line, column: 0 });
144-
return fixer.insertTextAfterRange([start, start], " ".repeat(-diff));
145-
}
146-
},
147-
});
148-
break;
149-
}
150-
}
151-
}
152-
};
153-
15494
return {
155-
Program: checkProgram,
15695
ClassDeclaration: checkDeclaration,
15796
FunctionDeclaration: checkDeclaration,
15897
TSEnumDeclaration: checkDeclaration,

scripts/eslint/rules/no-double-space.cjs

Lines changed: 0 additions & 72 deletions
This file was deleted.

scripts/eslint/rules/no-type-assertion-whitespace.cjs

Lines changed: 0 additions & 42 deletions
This file was deleted.

scripts/eslint/rules/object-literal-surrounding-space.cjs

Lines changed: 0 additions & 71 deletions
This file was deleted.

scripts/eslint/rules/simple-indent.cjs

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)