Last active
May 27, 2024 12:33
-
-
Save kashewnuts/13a072c6a6f1de774481e3028b1dd3c6 to your computer and use it in GitHub Desktop.
FlatConfig時代のESLintとPrettier設定(AMDモジュール対応版)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// mjs is used to avoid the need for a package.json file | |
import globals from "globals"; | |
import eslint from "@eslint/js"; | |
import eslintConfigPrettier from "eslint-config-prettier"; | |
export default [ | |
eslint.configs.recommended, | |
{ | |
languageOptions: { | |
globals: { | |
...globals.amd, | |
...globals.browser, | |
...globals.commonjs, | |
...globals.es2015, | |
...globals.jquery, | |
...globals.qunit, | |
}, | |
parserOptions: { | |
ecmaVersion: 6 | |
}, | |
}, | |
rules: { | |
"no-unused-vars": "off" | |
} | |
}, | |
// after other configs that you want to override. | |
eslintConfigPrettier | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
上記はrequire.jsを使ったプロジェクトで動作するように設定している。