Skip to content

Commit 6f01f0c

Browse files
treetipsusername
andauthored
Migrating from TSLint to ESLint (#2)
* refactor: remove TSLint dependencies and files * feat: add ESLint dependencies and files * refactor: fix warnings of ESLint rules * refactor: support prettier v2 format Co-authored-by: username <[email protected]>
1 parent ed4eafd commit 6f01f0c

File tree

8 files changed

+1172
-154
lines changed

8 files changed

+1172
-154
lines changed

.eslintrc.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
parser: "@typescript-eslint/parser",
3+
parserOptions: {
4+
project: "tsconfig.json",
5+
sourceType: "module",
6+
},
7+
plugins: ["@typescript-eslint/eslint-plugin"],
8+
extends: [
9+
"plugin:@typescript-eslint/eslint-recommended",
10+
"plugin:@typescript-eslint/recommended",
11+
"prettier",
12+
"prettier/@typescript-eslint",
13+
],
14+
root: true,
15+
env: {
16+
node: true,
17+
jest: true,
18+
},
19+
rules: {
20+
"@typescript-eslint/interface-name-prefix": "off",
21+
"@typescript-eslint/explicit-function-return-type": "off",
22+
"@typescript-eslint/no-explicit-any": "off",
23+
},
24+
}

components/molecules/NextListItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ type Props = {
5757
* Next.js optimized <ListItem>
5858
* @param props Props
5959
*/
60-
export const NextListItem = function(props: Props) {
60+
export const NextListItem = function (props: Props) {
6161
const { className, href, icon, primary, secondary, onClick } = props
6262
const classes = useStyles(props)
6363
const AvatorIcon = () => icon

components/organisms/HeaderArticleContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type Props = {
2121
* Header and article container component
2222
* @param props Props
2323
*/
24-
export const HeaderArticleContainer = function(props: Props) {
24+
export const HeaderArticleContainer = function (props: Props) {
2525
const { children } = props
2626
const classes = useStyles(props)
2727
return (

model/TestData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Todo } from "./Todo"
22

33
// test data
4-
export let testTodos: Todo[] = []
4+
export const testTodos: Todo[] = []
55

66
for (let i = 0; i < 6; i++) {
77
testTodos.push({

0 commit comments

Comments
 (0)