Skip to content

Commit 9ac4bad

Browse files
committed
wip
1 parent 54b6127 commit 9ac4bad

File tree

9 files changed

+647
-1205
lines changed

9 files changed

+647
-1205
lines changed

meteor/.eslintignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

meteor/.eslintrc.js

Lines changed: 0 additions & 107 deletions
This file was deleted.

meteor/eslint.config.mjs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { generateEslintConfig } from '@sofie-automation/code-standard-preset/eslint/main.mjs'
2+
3+
const tmpRules = {
4+
// Temporary rules to be removed over time
5+
'@typescript-eslint/ban-types': 'off',
6+
'@typescript-eslint/no-namespace': 'off',
7+
'@typescript-eslint/no-var-requires': 'off',
8+
'@typescript-eslint/no-non-null-assertion': 'off',
9+
'@typescript-eslint/unbound-method': 'off',
10+
'@typescript-eslint/no-misused-promises': 'off',
11+
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
12+
}
13+
14+
const extendedRules = await generateEslintConfig({
15+
// tsconfigName: 'tsconfig.eslint.json',
16+
ignores: ['.meteor', 'public', 'scripts', 'server/_force_restart.js', '/packages/'],
17+
18+
// disableNodeRules: true,
19+
})
20+
extendedRules.push({
21+
files: ['**/*'],
22+
rules: {
23+
// custom
24+
'no-inner-declarations': 'off', // some functions are unexported and placed inside a namespace next to related ones
25+
26+
'n/no-extraneous-import': 'off', // because there are a lot of them as dev-dependencies
27+
'n/no-missing-import': 'off', // erroring on every single import
28+
'react/prop-types': 'off', // we don't use this
29+
'@typescript-eslint/no-empty-interface': 'off', // many prop/state types are {}
30+
'@typescript-eslint/promise-function-async': 'off', // event handlers can't be async
31+
32+
...tmpRules,
33+
},
34+
})
35+
36+
export default extendedRules

meteor/package.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"cov": "yarn unitcov && yarn cov-open",
2323
"license-validate": "node ../scripts/checkLicenses.js --allowed=\"MIT,BSD,ISC,Apache,Unlicense,CC0,LGPL,CC BY 3.0,CC BY 4.0,MPL 2.0,Python 2.0\" --excludePackages=timecode,rxjs/ajax,rxjs/fetch,rxjs/internal-compatibility,nw-pre-gyp-module-test,rxjs/operators,rxjs/testing,rxjs/webSocket,undefined,i18next-conv,@fortawesome/fontawesome-common-types,argv,indexof,custom-license,private,public-domain-module,@sofie-automation/corelib,@sofie-automation/shared-lib,@sofie-automation/job-worker",
2424
"lint": "run lint:raw .",
25-
"lint:raw": "eslint --ext .ts --ext .js --ext .tsx --ext .jsx",
25+
"lint:raw": "eslint",
2626
"lintfix": "run lint --fix",
2727
"quickformat": "prettier \"__mocks__/**\" --write ; prettier \"lib/**\" --write ; prettier \"server/**\" --write ; prettier \"client/**\" --write ; prettier \"*.json\" --write ; prettier \"*.js\" --write ; prettier \"*.md\" --write",
2828
"i18n-extract-pot": "node ./scripts/extract-i18next-pot.mjs -f \"{./lib/**/*.+(ts|tsx),./server/**/*.+(ts|tsx),../packages/job-worker/src/**/*.+(ts|tsx),../packages/corelib/src/**/*.+(ts|tsx),../packages/webui/src/**/*.+(ts|tsx)}\" -o i18n/template.pot",
@@ -77,7 +77,7 @@
7777
"@babel/core": "^7.26.0",
7878
"@babel/plugin-transform-modules-commonjs": "^7.26.3",
7979
"@shopify/jest-koa-mocks": "^5.3.1",
80-
"@sofie-automation/code-standard-preset": "~2.4.7",
80+
"@sofie-automation/code-standard-preset": "github:SuperFlyTV/sofie-code-standard-preset#commit=da1726cdf3eb9e6e60ecbd6e5373ceb07367b02b",
8181
"@sofie-automation/eslint-plugin": "^0.1.1",
8282
"@types/app-root-path": "^1.2.8",
8383
"@types/body-parser": "^1.19.5",
@@ -92,27 +92,20 @@
9292
"@types/request": "^2.48.12",
9393
"@types/semver": "^7.5.8",
9494
"@types/underscore": "^1.13.0",
95-
"@typescript-eslint/eslint-plugin": "^5.62.0",
96-
"@typescript-eslint/parser": "^5.62.0",
97-
"@typescript-eslint/utils": "^5.62.0",
9895
"babel-jest": "^29.7.0",
9996
"ejson": "^2.2.3",
100-
"eslint": "^8.57.1",
101-
"eslint-config-prettier": "^8.10.0",
102-
"eslint-plugin-jest": "^27.9.0",
103-
"eslint-plugin-node": "^11.1.0",
104-
"eslint-plugin-prettier": "^4.2.1",
97+
"eslint": "^9.18.0",
10598
"fast-clone": "^1.5.13",
10699
"glob": "^8.1.0",
107100
"i18next-conv": "^10.2.0",
108101
"i18next-scanner": "^4.6.0",
109102
"jest": "^29.7.0",
110103
"legally": "^3.5.10",
111104
"open-cli": "^8.0.0",
112-
"prettier": "^2.8.8",
105+
"prettier": "^3.4.2",
113106
"standard-version": "^9.5.0",
114107
"ts-jest": "^29.2.5",
115-
"typescript": "~5.1.6",
108+
"typescript": "~5.7.3",
116109
"yargs": "^17.7.2"
117110
},
118111
"prettier": "@sofie-automation/code-standard-preset/.prettierrc.json",

0 commit comments

Comments
 (0)