Skip to content

Commit

Permalink
Merge pull request #27 from etchteam/feat/add-yaml-and-json-linting
Browse files Browse the repository at this point in the history
Add YAML and JSON linting
  • Loading branch information
mergify[bot] authored Dec 6, 2023
2 parents 2c9f434 + afea6ba commit 92e3880
Show file tree
Hide file tree
Showing 5 changed files with 199 additions and 39 deletions.
34 changes: 0 additions & 34 deletions .eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .eslintrc.js
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Run the following:
```bash
npm i -D husky lint-staged

echo "module.exports = { '*.{ts,tsx,js,jsx}': 'eslint --fix' };" > lint-staged.config.js
echo "module.exports = { '*.{ts,tsx,js,jsx,yml,yaml,json}': 'eslint --fix' };" > lint-staged.config.js

npx husky install

Expand All @@ -35,7 +35,7 @@ npx husky set .husky/pre-commit "npx --no-install -- lint-staged"

Add the following to your lint-staged config:

`'*.{ts,tsx,js,jsx}': 'eslint --fix'`
`'*.{ts,tsx,js,jsx,yml,yaml,json}': 'eslint --fix'`

## Usage with VSCode

Expand Down
190 changes: 189 additions & 1 deletion package-lock.json

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

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,19 @@
"dependencies": {
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"eslint": "^8.53.0",
"eslint": ">=8.29.0",
"eslint-config-next": "^14.0.1",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-security": "^1.7.1",
"eslint-plugin-storybook": "^0.6.15",
"eslint-plugin-unused-imports": "^3.0.0",
"prettier": "^3.0.3"
"eslint-plugin-yml": "^1.10.0",
"prettier": ">=3.0.0"
},
"peerDependencies": {
"eslint": ">=8.29.0",
Expand Down
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ module.exports = {
'plugin:import/typescript',
'plugin:prettier/recommended',
'plugin:jsx-a11y/strict',
'plugin:json/recommended',
'plugin:yml/standard',
'plugin:yml/prettier',
],
plugins: ['unused-imports'],
parser: '@typescript-eslint/parser',
Expand Down

0 comments on commit 92e3880

Please sign in to comment.