Closed kosiakMD closed 3 years ago
Hey there, the error is this one:
You are linting ".", but all of the files matching the glob pattern "." are ignored.
Please verify that your ignore rules are correct.
@ocean90
I assumed that config should clarify that --config .eslintrc.js
.eslintrc.js:
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
// Only ESLint 6.2.0 and later support ES2020.
ecmaVersion: 2020,
},
env: {
es6: true,
node: true,
jest: true,
},
plugins: ['@typescript-eslint/eslint-plugin', 'prettier'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:node/recommended-module',
'plugin:prettier/recommended',
],
root: true,
ignorePatterns: ['.eslintrc.js', '**/*.js', 'nest-cli.json'],
rules: {
quotes: [
'error',
'single',
{
allowTemplateLiterals: true,
avoidEscape: true,
},
],
indent: ['error', 'tab'],
//
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'warn',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'prettier/prettier': 'error',
'max-classes-per-file': ['error', 1],
'no-use-before-define': 'warn',
'no-console': 'error',
// node
'node/exports-style': ['error', 'exports'],
'node/file-extension-in-import': 'off',
'node/prefer-global/buffer': ['error', 'always'],
'node/prefer-global/console': ['error', 'always'],
'node/prefer-global/process': ['error', 'always'],
'node/prefer-global/url-search-params': ['error', 'always'],
'node/prefer-global/url': ['error', 'always'],
'node/prefer-promises/dns': 'error',
'node/prefer-promises/fs': 'error',
'node/no-unsupported-features/es-syntax': 'off',
'node/no-missing-import': 'off',
'node/no-unpublished-import': 'off',
'node/no-extraneous-import': 'off',
// jest
// 'jest/no-disabled-tests': 'warn',
// 'jest/no-focused-tests': 'warn',
// 'jest/no-identical-title': 'error',
// 'jest/prefer-to-have-length': 'warn',
// 'jest/valid-expect': 'off',
},
};
.eslintignore
.git
.github
.husky
dist
So you only want to lint *.ts files? In that case you have to set eslint_extensions: ts
in your workflow.
@ocean90 oh, got it, thanks! Does this action support a config file at all?
It does, but for the list of extensions you have to use the --ext
CLI argument which by default only includes .js
, see https://eslint.org/docs/user-guide/command-line-interface#options.
@ocean90 I added eslint_extensions : ts
and tried with and without --conig .eslintrc.js
but Prettier and seems ESLint too doesn't see my config files and make checks of ignored files and with other rules that I wrote
A stale label has been added to this issue because it has been open 15 days with no activity. To keep this issue open, add a comment within 5 days.
I tried to omit "custom" json files, but no
config
Extended Error Description: