-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chore) Decouple linting and formatting concerns (#30)
- Loading branch information
1 parent
33a31ea
commit 0afa818
Showing
29 changed files
with
816 additions
and
746 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from './home-page'; | ||
export * from './home-page'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import test from "@playwright/test"; | ||
import { HomePage } from "../pages"; | ||
import { expect } from "@playwright/test"; | ||
import test from '@playwright/test'; | ||
import { HomePage } from '../pages'; | ||
import { expect } from '@playwright/test'; | ||
|
||
// This test is a sample E2E test. You can delete it. | ||
|
||
test("Sample test", async ({ page}) => { | ||
const homePage = new HomePage(page); | ||
await homePage.goto(); | ||
await expect(homePage.page.getByRole('link', { name: 'Home' })).toBeVisible(); | ||
}); | ||
test('Sample test', async ({ page }) => { | ||
const homePage = new HomePage(page); | ||
await homePage.goto(); | ||
await expect(homePage.page.getByRole('link', { name: 'Home' })).toBeVisible(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
/** | ||
* @returns {Promise<import('jest').Config>} | ||
*/ | ||
const path = require("path"); | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
collectCoverageFrom: [ | ||
"**/src/**/*.component.tsx", | ||
"!**/node_modules/**", | ||
"!**/vendor/**", | ||
"!**/src/**/*.test.*", | ||
"!**/src/declarations.d.ts", | ||
"!**/e2e/**", | ||
'**/src/**/*.component.tsx', | ||
'!**/node_modules/**', | ||
'!**/vendor/**', | ||
'!**/src/**/*.test.*', | ||
'!**/src/declarations.d.ts', | ||
'!**/e2e/**', | ||
], | ||
transform: { | ||
"^.+\\.tsx?$": ["@swc/jest"], | ||
'^.+\\.tsx?$': ['@swc/jest'], | ||
}, | ||
transformIgnorePatterns: ["/node_modules/(?!@openmrs)"], | ||
transformIgnorePatterns: ['/node_modules/(?!@openmrs)'], | ||
moduleNameMapper: { | ||
"@openmrs/esm-framework": "@openmrs/esm-framework/mock", | ||
"@openmrs/esm-utils": "@openmrs/esm-framework/mock", | ||
"\\.(s?css)$": "identity-obj-proxy", | ||
"^lodash-es/(.*)$": "lodash/$1", | ||
"^dexie$": require.resolve("dexie"), | ||
'@openmrs/esm-framework': '@openmrs/esm-framework/mock', | ||
'@openmrs/esm-utils': '@openmrs/esm-framework/mock', | ||
'\\.(s?css)$': 'identity-obj-proxy', | ||
'^lodash-es/(.*)$': 'lodash/$1', | ||
'^dexie$': require.resolve('dexie'), | ||
}, | ||
setupFilesAfterEnv: ["<rootDir>/src/setup-tests.ts"], | ||
testPathIgnorePatterns: [path.resolve(__dirname, "e2e")], | ||
testEnvironment: "jsdom", | ||
setupFilesAfterEnv: ['<rootDir>/src/setup-tests.ts'], | ||
testPathIgnorePatterns: [path.resolve(__dirname, 'e2e')], | ||
testEnvironment: 'jsdom', | ||
testEnvironmentOptions: { | ||
url: "http://localhost/", | ||
url: 'http://localhost/', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
"serve": "webpack serve --mode=development", | ||
"build": "webpack --mode production", | ||
"analyze": "webpack --mode=production --env analyze=true", | ||
"lint": "TIMING=1 eslint src --ext js,jsx,ts,tsx", | ||
"lint": "eslint src --ext js,jsx,ts,tsx --max-warnings 0", | ||
"prettier": "prettier --write \"src/**/*.{ts,tsx}\" --list-different", | ||
"typescript": "tsc", | ||
"test": "jest --config jest.config.js --passWithNoTests", | ||
|
@@ -21,11 +21,6 @@ | |
"extract-translations": "i18next 'src/**/*.component.tsx' --config ./i18next-parser.config.js", | ||
"test-e2e": "playwright test" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "pretty-quick --staged && yarn verify" | ||
} | ||
}, | ||
"browserslist": [ | ||
"extends browserslist-config-openmrs" | ||
], | ||
|
@@ -73,34 +68,38 @@ | |
"@types/react-router": "^5.1.20", | ||
"@types/react-router-dom": "^5.3.3", | ||
"@types/webpack-env": "^1.18.1", | ||
"@typescript-eslint/eslint-plugin": "^5.61.0", | ||
"@typescript-eslint/parser": "^5.61.0", | ||
"@typescript-eslint/eslint-plugin": "^7.8.0", | ||
"@typescript-eslint/parser": "^7.8.0", | ||
"css-loader": "^6.8.1", | ||
"dotenv": "^16.0.3", | ||
"eslint": "^8.44.0", | ||
"eslint": "^8.50.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-config-ts-react-important-stuff": "^3.0.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"eslint-plugin-react-hooks": "^4.6.2", | ||
"husky": "^8.0.3", | ||
"i18next": "^23.2.8", | ||
"i18next-parser": "^8.0.0", | ||
"identity-obj-proxy": "^3.0.0", | ||
"jest": "^29.7.0", | ||
"jest-cli": "^29.7.0", | ||
"jest-environment-jsdom": "^29.7.0", | ||
"lint-staged": "^15.2.2", | ||
"openmrs": "next", | ||
"prettier": "^2.8.8", | ||
"pretty-quick": "^3.1.3", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-i18next": "^11.18.6", | ||
"react-router-dom": "^6.14.1", | ||
"rxjs": "^6.6.7", | ||
"swc-loader": "^0.2.3", | ||
"turbo": "^1.12.4", | ||
"turbo": "^1.13.3", | ||
"typescript": "^4.9.5", | ||
"webpack": "^5.88.1", | ||
"webpack-cli": "^5.1.4" | ||
}, | ||
"lint-staged": { | ||
"packages/**/src/**/*.{ts,tsx}": "eslint --cache --fix --max-warnings 0", | ||
"*.{css,scss,ts,tsx}": "prettier --write --list-different" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
bracketSpacing: true, | ||
printWidth: 120, | ||
semi: true, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
trailingComma: 'all', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.