Skip to content

Commit 96532cd

Browse files
authored
Switch from ESLint to XO (#240)
This is part of my plan to align this repository more with the unified ecosystem. See https://github.com/orgs/mdx-js/discussions/2175
1 parent c295813 commit 96532cd

File tree

8 files changed

+823
-269
lines changed

8 files changed

+823
-269
lines changed

.editorconfig

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ root = true
33
[*]
44
indent_style = space
55
indent_size = 2
6-
tab_width = 2
76
end_of_line = lf
87
charset = utf-8
98
trim_trailing_whitespace = true

.eslintignore

-3
This file was deleted.

.eslintrc

-14
This file was deleted.

.prettierrc

-1
This file was deleted.

package.json

+14-4
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@
2424
"Markdown React"
2525
],
2626
"scripts": {
27-
"lint": "eslint . --cache -f friendly",
28-
"prepare": "patch-package && simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0"
27+
"lint": "xo"
2928
},
3029
"devDependencies": {
3130
"@1stg/common-config": "^7.2.0",
3231
"@changesets/changelog-github": "^0.4.7",
3332
"@changesets/cli": "^2.25.2",
34-
"patch-package": "^6.5.0",
3533
"typescript": "^4.8.4",
34+
"xo": "^0.53.0",
3635
"yarn-deduplicate": "^5.0.2"
3736
},
3837
"resolutions": {
@@ -109,5 +108,16 @@
109108
}
110109
]
111110
},
112-
"qna": "https://github.com/orgs/mdx-js/discussions"
111+
"qna": "https://github.com/orgs/mdx-js/discussions",
112+
"prettier": {
113+
"tabWidth": 2,
114+
"useTabs": false,
115+
"singleQuote": true,
116+
"bracketSpacing": false,
117+
"semi": false,
118+
"trailingComma": "none"
119+
},
120+
"xo": {
121+
"prettier": true
122+
}
113123
}

patches/eslint-mdx+2.0.2.patch

-17
This file was deleted.

test/component.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
export default ({ children }) => 'Hello, ' + children
1+
export default function Component({children}) {
2+
return 'Hello, ' + children
3+
}

yarn.lock

+806-228
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)