Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ernysans committed Apr 22, 2024
1 parent 7bf9ef2 commit 849ee06
Show file tree
Hide file tree
Showing 55 changed files with 1,139 additions and 1,935 deletions.
586 changes: 579 additions & 7 deletions .editorconfig

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

231 changes: 0 additions & 231 deletions .eslintrc.json

This file was deleted.

80 changes: 80 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
{
ignores: [
'node_modules/*',
'.github/*',
'functions/*',
'lib/*',
],
},
{
settings: {
'env': {
'browser': false,
'node': true,
},
'import/resolver': {
'node': {
'extensions': [
'.js',
'.jsx',
'.ts',
'.tsx',
],
},
},
'settings': {
'jsdoc': {
'tagNamePreference': {
'returns': 'return',
},
},
},
},
languageOptions: {
sourceType: 'module',
parserOptions: {
project: './tsconfig.json',
jsDocParsingMode: 'type-info',
ecmaVersion: 'latest',
sourceType: 'module',
tsconfigRootDir: './',
ecmaFeatures: {
modules: true,
spread: true,
restParams: true,
defaultParams: true,
},
},
},
files: [
'src/**/*.ts',
],
rules: {
'no-restricted-syntax': [
'off',
],
'max-len': [
'error',
{
'code': 200,
'ignoreComments': true,
'ignoreUrls': true,
},
],
'no-mixed-spaces-and-tabs': 'error',
'prefer-const': 'off',
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/no-namespace': ['off'],
'@typescript-eslint/no-unused-vars': ['off'],
},
},
);
4 changes: 2 additions & 2 deletions functions/src/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const remove = https.onCall({
await User.Helper.remove(data);
return {message: 'User Removed'};
} catch (error) {
// @ts-ignore
// @ts-expect-error
throw new https.HttpsError('unknown', error.message);
}
});
Expand Down Expand Up @@ -99,7 +99,7 @@ export const role = https.onCall({
const _role = await User.Helper.getRole(request.auth.uid, data?.role);
User.Helper.isAdmin({role: _role, fail: true, group: data?.group});
} catch (error) {
// @ts-ignore
// @ts-expect-error
throw new https.HttpsError('permission-denied', error.message);
}
try {
Expand Down
Loading

0 comments on commit 849ee06

Please sign in to comment.