This commit is contained in:
MartinBraquet
2026-02-19 17:01:19 +01:00
parent 2c90fc6cc8
commit 2bb84d3992
4 changed files with 37 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
module.exports = {
plugins: ['lodash', 'unused-imports'],
extends: ['eslint:recommended'],
ignorePatterns: ['lib', 'coverage', 'tests', 'jest.config.js'],
ignorePatterns: ['lib', 'coverage', 'jest.config.js'],
env: {
node: true,
},
@@ -33,6 +33,20 @@ module.exports = {
'no-constant-condition': 'off',
},
},
{
"files": ["**/*.test.ts", "**/*.test.tsx", "**/tests/**/*.ts"],
"env": {
"jest": true // makes expect, describe, it globals known
},
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off"
},
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.test.json'],
},
}
],
rules: {
'linebreak-style': [

View File

@@ -1,5 +1,5 @@
import { strip, getSocialUrl } from './socials'
import {discordLink} from "common/constants";
import {getSocialUrl, strip} from '../../src/socials'
import {discordLink} from "common/src/constants";
describe('strip', () => {
describe('x/twitter', () => {

View File

@@ -15,5 +15,11 @@
"common/*": ["./src/*", "../lib/*"]
}
},
"include": ["src/**/*.ts"]
"include": [
"src/**/*.ts"
],
"exclude": [
"**/*.test.ts",
"**/*.spec.ts"
]
}

13
common/tsconfig.test.json Normal file
View File

@@ -0,0 +1,13 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"types": [
"jest"
]
},
"include": [
"src/**/*.ts",
"tests/**/*.ts"
],
"exclude": []
}