Skip to content

Commit

Permalink
Merge pull request #118 from elsoul/fix/eslint
Browse files Browse the repository at this point in the history
add overrides on eslintrc
  • Loading branch information
KishiTheMechanic authored Sep 10, 2023
2 parents 4419696 + f4383d0 commit dff3d1b
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
62 changes: 62 additions & 0 deletions src/templates/init/eslintrc.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,37 @@ export const eslintrcJson = async (appName: string, template: string) => {
},
],
},
overrides: [
{
files: ['./functions/**/*.ts', './graphql/**/*.ts'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
env: {
es6: true,
},
rules: {
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/ban-ts-comment': [
'off',
{
'ts-ignore': 'allow-with-description',
},
],
},
},
],
}
} else if (
template === SkeetTemplate.NextJsFirestore ||
Expand Down Expand Up @@ -78,6 +109,37 @@ export const eslintrcJson = async (appName: string, template: string) => {
},
],
},
overrides: [
{
files: ['./functions/**/*.ts', './graphql/**/*.ts'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
env: {
es6: true,
},
rules: {
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/ban-ts-comment': [
'off',
{
'ts-ignore': 'allow-with-description',
},
],
},
},
],
}
}

Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@
dependencies:
"@sinonjs/commons" "^3.0.0"

"@skeet-framework/ai@^1.6.5":
"@skeet-framework/[email protected]":
version "1.6.5"
resolved "https://registry.yarnpkg.com/@skeet-framework/ai/-/ai-1.6.5.tgz#49e8abf2e6e96483981ba61c03fdb4df4c4f0d6f"
integrity sha512-xmxhMVdHObl2s8ssk3TMnCzQTImgv6d2AuYX/XACJQVk5+b7FqjVKvTOOoq1dGnbifLeTSkQyKNHF3rPqASGDA==
Expand Down

0 comments on commit dff3d1b

Please sign in to comment.