Skip to content

Commit

Permalink
add yml plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
le-cong committed Oct 22, 2024
1 parent 040ca55 commit 6520ea6
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/check-published-scheduled.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Check Published

on:
workflow_dispatch:
schedule:
- cron: '14 18 * * *'

Expand Down
12 changes: 9 additions & 3 deletions index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import prettier from 'eslint-config-prettier';
import { FlatCompat } from '@eslint/eslintrc';
import unicorn from 'eslint-plugin-unicorn';
import json from '@eslint/json';
import yaml from 'eslint-plugin-yml';

const ignores = [
...(await fs.readFile('.gitignore', 'utf-8')).split('\n').filter((path) => path.trim() !== ''),
Expand Down Expand Up @@ -427,16 +428,20 @@ const tsConfigurations = [
'@checkdigit/no-full-response': 'off',
},
},
].map((config) => ({ files: ['**/*.ts'], ...config })); // ensure all typescript configurations are targetting typescript files so that they don't interfere with other types of files
].map((config) => ({ files: ['**/*.ts'], ...config }));

const jsonConfigurations = [
{
files: ['**/*.json'],
ignores: ['package-lock.json'],
language: 'json/json',
...json.configs.recommended,
},
];
].map((config) => ({ files: ['**/*.json'], ...config }));

const yamlConfigurations = [...yaml.configs['flat/recommended']].map((config) => ({
files: ['**/*.yml', '**/*.yaml'],
...config,
}));

export default [
{ ignores },
Expand All @@ -447,4 +452,5 @@ export default [
},
...tsConfigurations,
...jsonConfigurations,
...yamlConfigurations,
];
62 changes: 62 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"eslint-plugin-no-secrets": "1.0.2",
"eslint-plugin-sonarjs": "1.0.4",
"eslint-plugin-unicorn": "56.0.0",
"eslint-plugin-yml": "^1.14.0",
"typescript-eslint": "8.11.0"
},
"engines": {
Expand Down

0 comments on commit 6520ea6

Please sign in to comment.