Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
___emitter: false,
},
},
{
files: ["**/cypress/integration/**/*", "**/cypress/support/**/*"],
globals: {
cy: false,
Cypress: false,
},
},
{
files: ["*.ts", "*.tsx"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint/eslint-plugin"],
rules: {
...TSEslint.configs.recommended.rules,
// This rule ensures that typescript types do not have semicolons
// at the end of their lines, since our prettier setup is to have no semicolons
// e.g.,
// interface Foo {
// - baz: string;
// + baz: string
// }
"@typescript-eslint/member-delimiter-style": [
"error",
{
multiline: {
delimiter: "none",
},
},
],
// This ensures all interfaces are named with an I as a prefix
"no-unused-vars": "off",
"@swissquote/swissquote/@typescript-eslint/no-unused-vars": [
"error",
{ args: "none", vars: "local", ignoreRestSiblings: true }
],
// Overrides of TypeScript recommended
"@swissquote/swissquote/@typescript-eslint/explicit-function-return-type": "off",
"@swissquote/swissquote/@typescript-eslint/explicit-member-accessibility": "off",
"@swissquote/swissquote/@typescript-eslint/no-empty-function": "warn",
}
};
addMissingRules(
require("@typescript-eslint/eslint-plugin").configs.recommended.rules,
module.exports.rules,
Object.keys(require("./typescript").rules)
);
'import/no-extraneous-dependencies': 'off',
'no-console': 'off',
'jest/valid-describe': 'off',
'jest/no-test-prefixes': 'off',
'jest/no-identical-title': 'off',
},
globals: {
step: false,
},
},
merge(
// ESLint doesn't allow the `extends` field inside `overrides`, so we need to compose
// the TypeScript config manually using internal bits from various plugins
{},
// base TypeScript config: parser options, add plugin with rules
require( '@typescript-eslint/eslint-plugin' ).configs.base,
// basic recommended rules config from the TypeScript plugin
{ rules: require( '@typescript-eslint/eslint-plugin' ).configs.recommended.rules },
// Prettier rules config
require( 'eslint-config-prettier/@typescript-eslint' ),
// Our own overrides
{
files: [ '**/*.ts', '**/*.tsx' ],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/no-unused-vars': [ 'error', { ignoreRestSiblings: true } ],
'@typescript-eslint/no-use-before-define': [
'error',
{ functions: false, typedefs: false },
],
'no-use-before-define': 'off',
'jest/valid-describe': 'off',
'jest/no-test-prefixes': 'off',
'jest/no-identical-title': 'off',
},
globals: {
step: false,
},
},
merge(
// ESLint doesn't allow the `extends` field inside `overrides`, so we need to compose
// the TypeScript config manually using internal bits from various plugins
{},
// base TypeScript config: parser options, add plugin with rules
require( '@typescript-eslint/eslint-plugin' ).configs.base,
// basic recommended rules config from the TypeScript plugin
{ rules: require( '@typescript-eslint/eslint-plugin' ).configs.recommended.rules },
// Prettier rules config
require( 'eslint-config-prettier/@typescript-eslint' ),
// Our own overrides
{
files: [ '**/*.ts', '**/*.tsx' ],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/no-unused-vars': [ 'error', { ignoreRestSiblings: true } ],
'@typescript-eslint/no-use-before-define': [
'error',
{ functions: false, typedefs: false },
],
'no-use-before-define': 'off',
'@typescript-eslint/no-var-requires': 'off',
// REST API objects include underscores