Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
lint-staged
5 changes: 0 additions & 5 deletions meteor/.eslintignore

This file was deleted.

107 changes: 0 additions & 107 deletions meteor/.eslintrc.js

This file was deleted.

37 changes: 37 additions & 0 deletions meteor/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { generateEslintConfig } from '@sofie-automation/code-standard-preset/eslint/main.mjs'

const tmpRules = {
// Temporary rules to be removed over time
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/no-require-imports': 'off',
}

const extendedRules = await generateEslintConfig({
// tsconfigName: 'tsconfig.eslint.json',
ignores: ['.meteor', 'public', 'scripts', 'server/_force_restart.js', '/packages/'],

// disableNodeRules: true,
})
extendedRules.push({
files: ['**/*'],
rules: {
// custom
'no-inner-declarations': 'off', // some functions are unexported and placed inside a namespace next to related ones

'n/no-extraneous-import': 'off', // because there are a lot of them as dev-dependencies
'n/no-missing-import': 'off', // erroring on every single import
'react/prop-types': 'off', // we don't use this
'@typescript-eslint/no-empty-interface': 'off', // many prop/state types are {}
'@typescript-eslint/promise-function-async': 'off', // event handlers can't be async

...tmpRules,
},
})

export default extendedRules
18 changes: 5 additions & 13 deletions meteor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"cov": "yarn unitcov && yarn cov-open",
"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",
"lint": "run lint:raw .",
"lint:raw": "eslint --ext .ts --ext .js --ext .tsx --ext .jsx",
"lint:raw": "eslint",
"lintfix": "run lint --fix",
"quickformat": "prettier \"__mocks__/**\" --write ; prettier \"lib/**\" --write ; prettier \"server/**\" --write ; prettier \"client/**\" --write ; prettier \"*.json\" --write ; prettier \"*.js\" --write ; prettier \"*.md\" --write",
"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",
Expand Down Expand Up @@ -77,8 +77,7 @@
"@babel/core": "^7.26.0",
"@babel/plugin-transform-modules-commonjs": "^7.26.3",
"@shopify/jest-koa-mocks": "^5.3.1",
"@sofie-automation/code-standard-preset": "~2.4.7",
"@sofie-automation/eslint-plugin": "^0.1.1",
"@sofie-automation/code-standard-preset": "github:SuperFlyTV/sofie-code-standard-preset#commit=7656a8f8e52d53adafcca7326f48c7e10becdfb5",
"@types/app-root-path": "^1.2.8",
"@types/body-parser": "^1.19.5",
"@types/deep-extend": "^0.6.2",
Expand All @@ -92,27 +91,20 @@
"@types/request": "^2.48.12",
"@types/semver": "^7.5.8",
"@types/underscore": "^1.13.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@typescript-eslint/utils": "^5.62.0",
"babel-jest": "^29.7.0",
"ejson": "^2.2.3",
"eslint": "^8.57.1",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint": "^9.18.0",
"fast-clone": "^1.5.13",
"glob": "^8.1.0",
"i18next-conv": "^10.2.0",
"i18next-scanner": "^4.6.0",
"jest": "^29.7.0",
"legally": "^3.5.10",
"open-cli": "^8.0.0",
"prettier": "^2.8.8",
"prettier": "^3.4.2",
"standard-version": "^9.5.0",
"ts-jest": "^29.2.5",
"typescript": "~5.1.6",
"typescript": "~5.7.3",
"yargs": "^17.7.2"
},
"prettier": "@sofie-automation/code-standard-preset/.prettierrc.json",
Expand Down
2 changes: 1 addition & 1 deletion meteor/server/systemStatus/systemStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const integrationVersionAllowPrerelease = isPrerelease(PackageInfo.version)
// Any libraries that if a gateway uses should match a certain version
const expectedLibraryVersions: { [libName: string]: string } = {
'superfly-timeline': stripVersion(require('superfly-timeline/package.json').version),
// eslint-disable-next-line node/no-extraneous-require
// eslint-disable-next-line n/no-extraneous-require
'@mos-connection/helper': stripVersion(require('@mos-connection/helper/package.json').version),
}

Expand Down
Loading
Loading