Skip to content

Commit

Permalink
fix linting?
Browse files Browse the repository at this point in the history
  • Loading branch information
Wouter van der Plas committed Dec 27, 2023
1 parent 1269b67 commit bf0ff04
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .eslintIgnore → .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ node_moduals
.nyc_output
coverage

dist
.parcel-cache

tests/browser
14 changes: 12 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
"alwaysTryTypes": true,
"project": ["tsconfig.json", "tests/browser/tsconfig.json"]
},
"node": {
"extensions": [
Expand Down Expand Up @@ -99,7 +100,16 @@
},
"rules": {
"require-jsdoc": "off",
"jsdoc/require-jsdoc": "off"
"jsdoc/require-jsdoc": "off",
"unicorn/prevent-abbreviations": [
"error",
{
"allowList": {
"e2e": true
}
}
],
"unicorn/no-empty-file": "off"
}
}
],
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

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

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"dependencies": {
"@aws-crypto/sha256-js": "^5.2.0",
"@wmde/wikibase-datamodel-types": "git+https://github.com/wvanderp/WikibaseDataModelTypes.git",
"axios": "1.6.2",
"axios": "1.6.3",
"diff-arrays-of-objects": "git+https://github.com/wvanderp/diff-arrays-of-objects.git",
"qs": "^6.11.2",
"uuid": "^9.0.1",
Expand All @@ -69,9 +69,10 @@
"scripts": {
"build": "rimraf lib && tsc -P ./tsconfig.build.json",
"docs": "typedoc --out docs src/index.ts",
"lint": "npm-run-all -c -s tsc eslint",
"lint": "npm-run-all -c -s tsc eslint lint:browser",
"lint:browser": "cd tests/browser && npm run lint && cd ../..",
"tsc": "tsc --noEmit",
"eslint": "eslint --ext ts,js src/ tests/",
"eslint": "eslint --ext ts,js src/ tests/integration tests/unit",
"prepare": "cd tests/browser && npm install && cd ../..",
"prepublishOnly": "npm run build",
"test": "jest --testPathIgnorePatterns=\"integration/\"",
Expand Down
4 changes: 2 additions & 2 deletions tests/browser/cypress/e2e/login.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ describe('template spec', () => {
cy.window().then((win) => {
try {
win.eval(functionCall);
} catch (e) {
} catch (error) {
// eslint-disable-next-line no-console
console.error(e);
console.error(error);
}
});
});
Expand Down
1 change: 1 addition & 0 deletions tests/browser/cypress/support/e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// this file is needed for the e2e tests
5 changes: 4 additions & 1 deletion tests/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"clean": "rimraf lib/ .nyc_output/ coverage/ docs/ .parcel-cache/ dist/",
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"test": "concurrently --kill-others \"npm run app\" \"npm run cypress:run\""
"test": "concurrently --kill-others \"npm run app\" \"npm run cypress:run\"",
"lint": "npm-run-all -c -s eslint",
"tsc": "tsc --noEmit -P ./tsconfig.json",
"eslint": "eslint --ext ts,js cypress"
},
"dependencies": {
"dotenv": "^16.3.1"
Expand Down
17 changes: 15 additions & 2 deletions tests/browser/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
{
// "extends": "../../tsconfig.json",
"extends": "../../tsconfig.json",
"include": [
"../../node_modules/cypress",
"**/*.cy.js"
"**/*.cy.js",
"cypress/**/*.ts"
],
"exclude": [
"node_modules",
"build",
"./nyc_output",
"coverage",
"diff",
"./test.ts",
"./lib",
"./scrap.ts",
"../../src/",
"src"
],
"compilerOptions": {
"noEmit": true,
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"./test.ts",
"./lib",
"./scrap*.ts",
"**/*.spec.ts"
"**/*.spec.ts",
"tests/browser",
],
"filesGlob": [
"./src/**/*.ts"
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "es2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"target": "ES2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
"lib": ["es2019"], /* Specify library files to be included in the compilation. */
"lib": ["ES2019"], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
Expand Down

0 comments on commit bf0ff04

Please sign in to comment.