UNPKG

@unito/integration-cli

Version:

Integration CLI

96 lines (93 loc) 2.7 kB
import tseslint from '@typescript-eslint/eslint-plugin'; import tsParser from '@typescript-eslint/parser'; export default [ { ignores: ['node_modules/**', 'dist/**', 'eslint.config.mjs'], }, { files: ['**/*.{js,ts}'], languageOptions: { parser: tsParser, parserOptions: { project: './**/tsconfig.json', }, ecmaVersion: 'latest', sourceType: 'module', globals: { // Equivalent to env: { browser: true, node: true, es6: true } window: 'readonly', document: 'readonly', navigator: 'readonly', process: 'readonly', require: 'readonly', module: 'readonly', __dirname: 'readonly', }, }, plugins: { '@typescript-eslint': tseslint, }, rules: { // TypeScript rules '@typescript-eslint/no-loss-of-precision': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/ban-ts-comment': 'off', '@typescript-eslint/ban-ts-ignore': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/no-var-requires': 'off', '@typescript-eslint/no-floating-promises': 'error', '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/no-non-null-assertion': 'off', '@typescript-eslint/prefer-namespace-keyword': 'off', '@typescript-eslint/no-namespace': 'off', '@typescript-eslint/no-inferrable-types': 'off', '@typescript-eslint/naming-convention': [ 'warn', { selector: [ 'classProperty', 'objectLiteralProperty', 'typeProperty', 'classMethod', 'objectLiteralMethod', 'typeMethod', 'accessor', 'enumMember', ], format: null, modifiers: ['requiresQuotes'], }, ], // JavaScript rules 'no-whitespace-before-property': 'error', 'no-trailing-spaces': 'error', 'no-extra-boolean-cast': 'off', 'no-inner-declarations': 'off', 'no-useless-escape': 'off', 'no-case-declarations': 'off', 'space-unary-ops': [ 'error', { words: true, nonwords: false, }, ], 'space-before-function-paren': [ 'error', { anonymous: 'always', named: 'never', asyncArrow: 'always', }, ], 'object-curly-spacing': ['error', 'always'], 'no-console': ['error', { allow: ['info', 'error'] }], }, }, { files: ['test/**/*.test.ts'], rules: { '@typescript-eslint/no-floating-promises': 'off', }, }, ];