Skip to content

Commit

Permalink
config updates
Browse files Browse the repository at this point in the history
  • Loading branch information
smileynet committed Mar 4, 2023
1 parent 9e507fc commit c709a00
Show file tree
Hide file tree
Showing 9 changed files with 228 additions and 170 deletions.
13 changes: 2 additions & 11 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,12 @@ root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 100
max_line_length = 80
trim_trailing_whitespace = true

[*.{js,json,yml,ts}]
charset = utf-8
indent_style = space
indent_size = 2
quote_type = single

[*.md]
max_line_length = 0
trim_trailing_whitespace = false

[*.css]
indent_size = 4
7 changes: 0 additions & 7 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@ module.exports = defineConfig({
'eslint:recommended',
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin`
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:regexp/recommended',
'plugin:jest/recommended',
'plugin:jest/style',
'plugin:jest-formatting/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'plugin:react-redux/recommended',
'plugin:react/jsx-runtime'
],
Expand All @@ -29,11 +24,9 @@ module.exports = defineConfig({
'import',
'regexp',
'jest',
'jest-formatting',
'react-redux',
'react',
'react-hooks',
'jsx-a11y'
],
parser: '@typescript-eslint/parser',
parserOptions: {
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"semi": true,
"singleQuote": true,
"printWidth": 80,
"tabWidth": 2,
"tabWidth": 4,
"useTabs": false,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
Expand Down
5 changes: 5 additions & 0 deletions .run/chrome debugger.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="chrome debugger" type="JavascriptDebugType" uri="http://localhost:8000" useFirstLineBreakpoints="true">
<method v="2" />
</configuration>
</component>
5 changes: 5 additions & 0 deletions .run/chrome inspector.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="chrome inspector" type="ChromiumRemoteDebugType" factoryName="Chromium Remote" port="8000" restartOnDisconnect="true">
<method v="2" />
</configuration>
</component>
66 changes: 36 additions & 30 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
export default {
collectCoverage: false,
collectCoverageFrom: ['./src/**'],
coverageProvider: 'v8',
coverageDirectory: './test/coverage/',
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: -10
}
},
moduleFileExtensions: ['feature', 'js', 'jsx', 'json', 'ts', 'tsx', 'node'],
testMatch: ['**/test/**/?(*.)+(spec|test|steps).+(ts|tsx|js)'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
'^.+\\.(js|jsx)?$': 'babel-jest'
},
setupFiles: ['jest-canvas-mock'],
setupFilesAfterEnv: [
'@testing-library/jest-dom',
'@testing-library/jest-dom/extend-expect'
],
testEnvironmentOptions: {
url: 'http://localhost/'
},
testEnvironment: 'jsdom',
moduleNameMapper: {
'^uuid$': require.resolve('uuid')
}
collectCoverage: false,
collectCoverageFrom: ['./src/**'],
coverageProvider: 'v8',
coverageDirectory: './test/coverage/',
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: -10
}
},
moduleFileExtensions: ['feature', 'js', 'jsx', 'json', 'ts', 'tsx', 'node'],
testMatch: ['**/test/**/?(*.)+(spec|test|steps).+(ts|tsx|js)'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
'^.+\\.(js|jsx)?$': 'babel-jest'
},
setupFiles: ['jest-canvas-mock'],
setupFilesAfterEnv: [
'@testing-library/jest-dom',
'@testing-library/jest-dom/extend-expect'
],
testEnvironmentOptions: {
url: 'http://localhost/'
},
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
testEnvironment: 'jsdom',
moduleNameMapper: {
'^uuid$': require.resolve('uuid')
},

watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname'
]
};
217 changes: 108 additions & 109 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,112 +1,111 @@
{
"name": "postapoc",
"version": "0.0.1",
"type": "module",
"packageManager": "yarn@3.4.1",
"description": "Mashing up all the things from our favorite survival games.",
"main": "src/main.tsx",
"author": {
"name": "Sam Biggins",
"email": "sam@weneedadomain.com",
"url": "https://github.com/smileynet"
},
"contributors": [
{
"name": "Daniel Whitehead",
"email": "daniel@weneedadomain.com",
"url": "https://github.com/Unnamed-GameDev-Studio"
"name": "postapoc",
"version": "0.0.1",
"type": "module",
"packageManager": "yarn@3.4.1",
"description": "Mashing up all the things from our favorite survival games.",
"main": "src/main.tsx",
"author": {
"name": "Sam Biggins",
"email": "sam@weneedadomain.com",
"url": "https://github.com/smileynet"
},
"contributors": [
{
"name": "Daniel Whitehead",
"email": "daniel@weneedadomain.com",
"url": "https://github.com/Unnamed-GameDev-Studio"
}
],
"license": "MIT",
"licenseUrl": "http://www.opensource.org/licenses/mit-license.php",
"private": true,
"homepage": "https://github.com/Unnamed-GameDev-Studio/postapoc#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/Unnamed-GameDev-Studio/postapoc.git"
},
"bugs": {
"url": "https://github.com/Unnamed-GameDev-Studio/postapoc/issues"
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"serve": "vite preview",
"lint": "tsc && eslint src",
"putout": "putout src",
"test": "jest",
"coverage": "jest --coverage",
"coverage-all": "jest --coverage --watchAll",
"test:watch": "jest --watch",
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand"
},
"dependencies": {
"@reduxjs/toolkit": "^1.9.3",
"phaser": "^3.55.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.0.5",
"redux": "^4.2.1",
"tslog": "^4.7.4"
},
"devDependencies": {
"@babel/core": "^7.21.0",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"@cucumber/cucumber": "^8.11.1",
"@nabla/vite-plugin-eslint": "^1.5.0",
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^13.2.1",
"@types/babel__core": "^7",
"@types/babel__preset-env": "^7",
"@types/eslint": "^8.21.0",
"@types/eslint-plugin-prettier": "^3.1.0",
"@types/jest": "^29.4.0",
"@types/node": "^18.14.0",
"@types/prettier": "^2.7.2",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@typescript-eslint/eslint-plugin": "^5.51.0",
"@typescript-eslint/parser": "^5.51.0",
"@vitejs/plugin-react-swc": "^3.2.0",
"babel-jest": "^29.4.3",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.6.0",
"eslint-define-config": "^1.15.0",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-jest-formatting": "^3.1.0",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-only-warn": "^1.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-redux": "^4.0.0",
"eslint-plugin-regexp": "^1.12.0",
"gh-pages": "^5.0.0",
"jest": "^29.4.3",
"jest-canvas-mock": "^2.4.0",
"jest-cli": "^29.4.3",
"jest-cucumber": "^3.0.1",
"jest-environment-jsdom": "^29.4.3",
"phasereditor2d-launcher": "^3.36.2",
"prettier": "^2.8.4",
"prettier-eslint": "^15.0.1",
"putout": "^28.17.0",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"tslib": "^2.5.0",
"typedoc": "^0.23.25",
"typescript": "^4.9.5",
"typesync": "^0.10.0",
"vite": "^4.1.1",
"vite-plugin-gh-pages": "^0.4.1",
"web-vitals": "^2.1.0"
}
],
"license": "MIT",
"licenseUrl": "http://www.opensource.org/licenses/mit-license.php",
"private": true,
"homepage": "https://github.com/Unnamed-GameDev-Studio/postapoc#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/Unnamed-GameDev-Studio/postapoc.git"
},
"bugs": {
"url": "https://github.com/Unnamed-GameDev-Studio/postapoc/issues"
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"serve": "vite preview",
"lint": "tsc && eslint src",
"docs": "typedoc",
"editor": "phasereditor2d-launcher -project .",
"putout": "putout src",
"test": "jest",
"coverage": "jest --coverage",
"coverage-all": "jest --coverage --watchAll",
"test:watch": "jest --watch",
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand"
},
"dependencies": {
"@reduxjs/toolkit": "^1.9.3",
"phaser": "^3.55.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redux": "^4.2.1",
"tslog": "^4.7.4"
},
"devDependencies": {
"@babel/core": "^7.21.0",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"@cucumber/cucumber": "^8.11.1",
"@nabla/vite-plugin-eslint": "^1.5.0",
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^13.2.1",
"@types/babel__core": "^7",
"@types/babel__preset-env": "^7",
"@types/eslint": "^8.21.0",
"@types/eslint-plugin-prettier": "^3.1.0",
"@types/jest": "^29.4.0",
"@types/node": "^18.14.0",
"@types/prettier": "^2.7.2",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@typescript-eslint/eslint-plugin": "^5.51.0",
"@typescript-eslint/parser": "^5.51.0",
"@vitejs/plugin-react-swc": "^3.2.0",
"babel-jest": "^29.4.3",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.6.0",
"eslint-define-config": "^1.15.0",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-jest-formatting": "^3.1.0",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-only-warn": "^1.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-redux": "^4.0.0",
"eslint-plugin-regexp": "^1.12.0",
"gh-pages": "^5.0.0",
"jest": "^29.4.3",
"jest-canvas-mock": "^2.4.0",
"jest-cli": "^29.4.3",
"jest-cucumber": "^3.0.1",
"jest-environment-jsdom": "^29.4.3",
"phasereditor2d-launcher": "^3.36.2",
"prettier": "^2.8.4",
"prettier-eslint": "^15.0.1",
"putout": "^28.17.0",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"tslib": "^2.5.0",
"typedoc": "^0.23.25",
"typescript": "^4.9.5",
"typesync": "^0.10.0",
"vite": "^4.1.1",
"vite-plugin-gh-pages": "^0.4.1",
"web-vitals": "^2.1.0"
}
}
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext", "DOM", "DOM.Iterable", "scripthost"],
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"types": ["vite/client", "jest", "node"],
"moduleResolution": "Node",
"strict": true,
Expand All @@ -15,7 +15,6 @@
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
Expand Down
Loading

0 comments on commit c709a00

Please sign in to comment.