Skip to content

Instantly share code, notes, and snippets.

@kashewnuts
Last active May 27, 2024 12:33
Show Gist options
  • Save kashewnuts/13a072c6a6f1de774481e3028b1dd3c6 to your computer and use it in GitHub Desktop.
Save kashewnuts/13a072c6a6f1de774481e3028b1dd3c6 to your computer and use it in GitHub Desktop.
FlatConfig時代のESLintとPrettier設定(AMDモジュール対応版)
// 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
];
@kashewnuts
Copy link
Author

kashewnuts commented May 27, 2024

上記はrequire.jsを使ったプロジェクトで動作するように設定している。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment