beeauvin / sunbeams

a little something to brighten your day
Mozilla Public License 2.0
2 stars 0 forks source link

editor eslint config support without hacks #39

Closed beeauvin closed 1 year ago

beeauvin commented 1 year ago

Currently we need a hack to get editor eslint plugins (like vs code) to pickup the right tsconfig while working in a workspace based monorepo. The lint command runs fine without this but having the editor be grumpy isn't fun.

The current, not great, solution is to make your .eslintrc.js file look like this (for workspace projects):

module.exports = {
  extends: ['@sunbeams'],
  overrides: [
    {
      files: ['*.ts', '*.tsx'],
      parserOptions: {
        project: './tsconfig.json',
        tsconfigRootDir: __dirname
      }
    }
  ]
}
beeauvin commented 1 year ago

Unnecessary as of https://github.com/cassiecascade/sunbeams/issues/102