tiagob / create-full-stack

Set up a TypeScript full stack with one command.
https://create-full-stack.com
MIT License
97 stars 9 forks source link

Investigate eslint overrides for file or path specific rules #95

Open tiagob opened 4 years ago

tiagob commented 4 years ago

https://eslint.org/docs/user-guide/configuring#specifying-processor

Ex. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/filename-case.md PascalCase for .tsx files. camelCase for .ts and .js files

    // Ignore "up" and "down" migration methods generated by typeorm.
    // https://typeorm.io/#/migrations/creating-a-new-migration
    // Found in the templates in packages/server/src/migration/
    "class-methods-use-this": ["error", { exceptMethods: ["up", "down"] }],
...
    "unicorn/filename-case": [
      "error",
      {
        cases: {
          camelCase: true,
          pascalCase: true,
        },
        // Ignore migration files generated by typeorm.
        // https://typeorm.io/#/migrations/creating-a-new-migration
        // Found in the templates in packages/server/src/migration/
        ignore: [/\d+-.+ts/],
      },
    ],