Skip to content

Commit

Permalink
chore: tslint -> eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
v.potekhin committed Dec 5, 2023
1 parent 22a1aea commit c777bfa
Show file tree
Hide file tree
Showing 39 changed files with 22,065 additions and 12,351 deletions.
26 changes: 26 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* @type {import('eslint').Linter.Config}
*/
module.exports = {
root: true,
extends: ['plugin:@taiga-ui/experience/all'],
overrides: [
{
files: ['*.ts'],
rules: {
'@typescript-eslint/quotes': ['error', 'single'],
'@taiga-ui/experience/prefer-inject-decorator': 'off',
'@taiga-ui/experience/no-typeof': 'off',
'@typescript-eslint/consistent-type-assertions': 'off',
'no-restricted-syntax': 'off', // TODO
'unicorn/filename-case': 'off',
},
},
{
files: ['*'],
rules: {
'no-irregular-whitespace': 'off',
},
},
],
};
44 changes: 22 additions & 22 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,42 @@ import {Config} from 'jest';
import {resolve} from 'path';
import {pathsToModuleNameMapper} from 'ts-jest';

process.env.TZ = `Europe/Moscow`;
process.env.FORCE_COLOR = `true`;
process.env.TS_JEST_DISABLE_VER_CHECKER = `true`;
process.env.TZ = 'Europe/Moscow';
process.env.FORCE_COLOR = 'true';
process.env.TS_JEST_DISABLE_VER_CHECKER = 'true';

const {compilerOptions} = require(resolve(__dirname, `tsconfig.json`));
const {compilerOptions} = require(resolve(__dirname, 'tsconfig.json'));

const config: Config = {
rootDir: __dirname,
preset: `jest-preset-angular`,
testEnvironment: `jsdom`,
preset: 'jest-preset-angular',
testEnvironment: 'jsdom',
globals: {
'ts-jest': {
tsconfig: resolve(__dirname, `tsconfig.spec.json`),
tsconfig: resolve(__dirname, 'tsconfig.spec.json'),
isolatedModules: true,
},
},
extensionsToTreatAsEsm: [`.ts`],
setupFilesAfterEnv: [`<rootDir>/setup-jest.ts`],
transform: {'^.+\\.(ts|js|mjs|html|svg)$': `jest-preset-angular`},
testMatch: [`<rootDir>/projects/**/*.spec.ts`],
testPathIgnorePatterns: [`/node_modules/`, `/schematics/`],
coverageDirectory: `<rootDir>/coverage`,
extensionsToTreatAsEsm: ['.ts'],
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
transform: {'^.+\\.(ts|js|mjs|html|svg)$': 'jest-preset-angular'},
testMatch: ['<rootDir>/projects/**/*.spec.ts'],
testPathIgnorePatterns: ['/node_modules/', '/schematics/'],
coverageDirectory: '<rootDir>/coverage',
collectCoverageFrom: [
`**/ng-polymorpheus/**/*.ts`,
`!**/ng-polymorpheus/**/*.spec.ts`,
`!**/jest.config.ts`,
'**/ng-polymorpheus/**/*.ts',
'!**/ng-polymorpheus/**/*.spec.ts',
'!**/jest.config.ts',
],
coveragePathIgnorePatterns: [`node_modules`, `schematics`, `.spec.ts`],
coveragePathIgnorePatterns: ['node_modules', 'schematics', '.spec.ts'],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: `<rootDir>/${compilerOptions.baseUrl}/`
.replace(/\.\//g, `/`)
.replace(/\/\/+/g, `/`),
.replace(/\.\//g, '/')
.replace(/\/\/+/g, '/'),
}),
modulePathIgnorePatterns: [`dist/`],
cacheDirectory: `<rootDir>/node_modules/.cache/jest`,
reporters: [`default`],
modulePathIgnorePatterns: ['dist/'],
cacheDirectory: '<rootDir>/node_modules/.cache/jest',
reporters: ['default'],
collectCoverage: true,
verbose: true,
};
Expand Down
Loading

0 comments on commit c777bfa

Please sign in to comment.