Skip to content

Commit

Permalink
chore: Add new lint infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3 committed Aug 12, 2024
1 parent 232bce9 commit 38fa0ef
Show file tree
Hide file tree
Showing 11 changed files with 3,427 additions and 1,859 deletions.
10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
node_modules
/lib
/src/playground.ts

.idea
.vscode
.history
.env
.DS_Store
/dist
/build
/cache
/coverage
8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
root: true,
extends: require.resolve('@diplodoc/lint/eslint-config'),
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
};
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -294,3 +294,14 @@ dist

# build
lib/*

.idea
.vscode
.history
.DS_Store
node_modules
/lib
/dist
/build
/cache
/coverage
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run pre-commit
6 changes: 6 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
'**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}': ['prettier --write', 'eslint --max-warnings=0 --fix'],
'**/*.{css,scss}': ['prettier --write', 'stylelint --fix'],
'**/*.{json,yaml,yml,md}': ['prettier --write'],
'**/*.{svg,svgx}': ['svgo'],
};
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.idea
.vscode
.history
.env
.DS_Store
node_modules
/lib
/dist
/build
/cache
/coverage
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@diplodoc/lint/prettier-config');
11 changes: 11 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.idea
.vscode
.history
.env
.DS_Store
node_modules
/lib
/dist
/build
/cache
/coverage
3 changes: 3 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: require.resolve('@diplodoc/lint/stylelint-config'),
};
Loading

0 comments on commit 38fa0ef

Please sign in to comment.