Skip to content

Commit

Permalink
chore: optimize project configuration (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 authored Sep 26, 2023
1 parent ba77625 commit bb2a1f0
Show file tree
Hide file tree
Showing 17 changed files with 6,853 additions and 450 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/node_modules/*
.dist/
121 changes: 121 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"root": true,
"env": {
"es6": true,
"node": true,
"shared-node-browser": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module"
},
"extends": [
"plugin:prettier/recommended",
"prettier"
],
"plugins": [
"@typescript-eslint/eslint-plugin",
"import",
"jest"
],
"overrides": [
{
"files": [
"*.ts",
"*.tsx"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint/eslint-plugin"
],
"rules": {
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_"
}
],
"no-unused-vars": "off",
"no-shadow": "off",
"@typescript-eslint/no-shadow": 1,
"no-undef": "off",
"func-call-spacing": "off",
"@typescript-eslint/func-call-spacing": 1
}
},
{
"files": [
"*.{spec,test}.{js,ts,tsx}",
"**/__{mocks,tests}__/**/*.{js,ts,tsx}"
],
"env": {
"jest": true,
"jest/globals": true
},
"rules": {
"react-native/no-inline-styles": 0,
"quotes": [
1,
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
]
}
}
],
"globals": {
"define": false,
"obj_attrib": false,
"info": false,
"NodeJS": false,
"window": false,
"alert": false,
"document": false,
"HTMLElement": false,
"HTMLDivElement": false,
"WebGL2RenderingContext": false,
"WebGLTexture": false,
"HTMLCanvasElement": false,
"ResizeObserver": false,
"name": false,
"Element": false
},
"rules": {
"prettier/prettier": [
"error",
{
"quoteProps": "consistent",
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
}
],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "warn",
"import/order": [
"error",
{
"newlines-between": "always-and-inside-groups",
"alphabetize": {
"order": "asc",
"orderImportKind": "asc"
}
}
],
"sort-imports": [
"error",
{
"ignoreDeclarationSort": true,
"ignoreMemberSort": false
}
],
"jest/no-disabled-tests": 1,
"jest/no-focused-tests": 1,
"jest/no-identical-title": 1,
"jest/valid-expect": 1
}
}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.ccls-cache/
node_modules/
src/**/*.js
package-lock.json
dist/
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/node_modules/*
.dist/
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"quoteProps": "consistent",
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
}
6 changes: 6 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
coverageDirectory: 'coverage',
preset: 'ts-jest',
testEnvironment: 'node',
testRegex: '/__tests__/.*\\.(test|spec)\\.[jt]sx?$',
};
Loading

0 comments on commit bb2a1f0

Please sign in to comment.