shinGangan / nuxt-eslint-module

Nuxt modules that extend and use the Nuxt ESLint module
MIT License
0 stars 0 forks source link

Design Doc: linter module `v0.1.0` #8

Open shinGangan opened 4 months ago

shinGangan commented 4 months ago

Design Doc

Context

Create a module that extends the Nuxt ESLint module and adds commonly used ESLint rules. There is a possibility of adding Prettier, StyleLint, MarkdownLint, etc. in the future, but v0.1.0 will only add ESLint.

Design

module example

// module.ts

export default defineNuxtModule<ModuleOptions>({
  // ...
  async setup(_options, _nuxt) {
    // 1. add eslint config template

    // 2. install module
  }
});

Set ESLint module as follows.

Set ESLint rules as follows. Note that the contents set in @nuxt/eslint-config are not set.

Discuss

add eslint-config-prettier? ๐Ÿค”

shinGangan commented 4 months ago

Draft

Considering the reusability of the module, it may be easier to maintain it by cutting it out as eslint-config. ๐Ÿค”

eslint-plugin-import-access

I often create monorepo configurations using pnpm workspace. Therefore, I think that eslint-plugin-import-access is also effective. I haven't used it so far

eslint-plugin-vue-scoped-css

eslint-plugin-vuejs-accessibility

shinGangan commented 4 months ago

ใ“ใกใ‚‰ใงๆ•ด็†ใ™ใ‚‹

https://zenn.dev/gangannikki/scraps/adc7f3d0a19d9a