Skip to content

Commit

Permalink
Merge branch 'main' into BC-7882-switch-to-new-tldraw-server
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenWaysDP authored Nov 11, 2024
2 parents b1c882b + 1dcc712 commit 7c6088a
Show file tree
Hide file tree
Showing 21 changed files with 1,052 additions and 877 deletions.
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

63 changes: 0 additions & 63 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
contents: read

env:
NODE_VERSION: '20'
NODE_VERSION: '22'
jobs:
tests_cov:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/node:20-alpine
FROM docker.io/node:22-alpine

RUN apk add gcompat

Expand Down
99 changes: 99 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
import { FlatCompat } from '@eslint/eslintrc';
import js from '@eslint/js';
import typescriptEslintEslintPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import jest from 'eslint-plugin-jest';
import globals from 'globals';
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
{
ignores: ['**/.eslintrc.cjs', '**/ansible', '**/.github', 'src/infra/authorization/authorization-api-client'],
},
...compat.extends('plugin:@typescript-eslint/stylistic-type-checked', 'plugin:prettier/recommended'),
{
plugins: {
'@typescript-eslint': typescriptEslintEslintPlugin,
jest,
},

languageOptions: {
globals: {
...globals.node,
...globals.jest,
},

parser: tsParser,
ecmaVersion: 5,
sourceType: 'module',

parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: '.',
},
},

rules: {
'newline-before-return': 'error',
'require-await': 'error',
'no-return-assign': 'error',
'max-classes-per-file': 'error',
'@typescript-eslint/explicit-member-accessibility': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/unbound-method': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',

'@typescript-eslint/naming-convention': [
'error',
{
selector: 'interface',
format: ['PascalCase'],

custom: {
regex: '^I[A-Z]',
match: false,
},
},
],

'@typescript-eslint/no-empty-interface': [
'error',
{
allowSingleExtends: true,
},
],
},
},
{
files: ['**/*spec.ts'],

plugins: {
jest,
},

languageOptions: {
globals: {
...globals.jest,
},
},

rules: {
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'jest/unbound-method': 'error',
'jest/prefer-spy-on': 'error',
},
},
];
Loading

0 comments on commit 7c6088a

Please sign in to comment.