-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from Opetushallitus/OK-673-henkilo-pistesyotto
OK-673: Henkilö-näkymän pistesyöttö
- Loading branch information
Showing
75 changed files
with
3,421 additions
and
1,906 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
import path from 'path'; | ||
|
||
const eslintCommand = (filenames) => | ||
`next lint --fix --no-ignore --max-warnings=0 ${filenames | ||
.map((f) => `--file ${path.relative(process.cwd(), f)}`) | ||
.join(' ')}`; | ||
|
||
const eslintCommand = 'eslint --fix --no-ignore --max-warnings=0'; | ||
const prettierCommand = 'prettier --write -u'; | ||
|
||
const config = { | ||
'**/*.{js,mjs,cjs,jsx,ts,tsx}': [eslintCommand, prettierCommand], | ||
'!**/*.{js,mjs,cjs,jsx,ts,tsx}': [prettierCommand], | ||
'!**/*.{js,mjs,cjs,jsx,ts,tsx}': prettierCommand, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
audit=false | ||
fund=false | ||
fund=false | ||
legacy-peer-deps=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// @ts-check | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
import js from '@eslint/js'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
import ts from 'typescript-eslint'; | ||
import playwright from 'eslint-plugin-playwright'; | ||
import eslintConfigPrettier from 'eslint-config-prettier'; | ||
|
||
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, | ||
}); | ||
|
||
const config = ts.config( | ||
{ ignores: ['.next/*', '.open-next/*', 'cdk/*', './.lintstagedrc.mjs'] }, | ||
...compat.extends('next/core-web-vitals', 'next/typescript'), | ||
eslintConfigPrettier, | ||
{ | ||
languageOptions: { | ||
parserOptions: { | ||
projectService: true, | ||
tsconfigRootDir: import.meta.dirname, | ||
}, | ||
}, | ||
rules: { | ||
'no-restricted-imports': [ | ||
'error', | ||
{ | ||
patterns: ['@mui/*/*/*', '../../*'], | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
...playwright.configs['flat/recommended'], | ||
files: ['tests/e2e/**/*.ts'], | ||
rules: { | ||
...playwright.configs['flat/recommended'].rules, | ||
'@typescript-eslint/no-floating-promises': 'error', | ||
'playwright/expect-expect': 'off', | ||
'playwright/no-conditional-in-test': 'off', | ||
'playwright/no-conditional-expect': 'off', | ||
}, | ||
}, | ||
); | ||
|
||
export default config; |
Oops, something went wrong.