Add support for TypeScript + TSX (#235)

This commit is contained in:
Pedro Ferreira 2024-08-09 21:13:20 +02:00 committed by GitHub
parent f913f23b23
commit a61334a955
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 1367 additions and 322 deletions

View File

@ -8,16 +8,13 @@ charset=utf-8
trim_trailing_whitespace=true
insert_final_newline=true
[{*.js,*.jsx}]
[{*.js,*.jsx,*.ts,*.tsx}]
indent_size=2
[{*.css,*.scss}]
indent_size=2
[{*.yml,*.yaml}]
indent_size=2
[package.json]
[{*.yml,*.yaml,*.json}]
indent_size=2
[Makefile]

View File

@ -1,12 +1,13 @@
/* eslint-disable import/no-commonjs, import/unambiguous */
/* global module:false, __dirname:false */
const path = require('path');
const fs = require('fs');
const {execSync} = require('child_process');
const fs = require('fs');
const path = require('path');
const yaml = require('js-yaml');
const _ = require('lodash');
const resolve = require('resolve');
const yaml = require('js-yaml');
// Returns the path to the Indico source package/repo
const PATH_COMMAND = `python -c 'from flask.helpers import get_root_path; print(get_root_path("indico"))'`;
@ -63,7 +64,7 @@ module.exports = _.merge(defaultConfig, {
},
parserOptions: {
babelOptions: {
configFile: babelConfigFile
}
}
configFile: babelConfigFile,
},
},
});

1651
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,11 @@
"repository": "https://github.com/indico/indico-plugins",
"author": "Indico Team <indico-team@cern.ch>",
"devDependencies": {
"@babel/core": "^7.24.7",
"@babel/eslint-parser": "^7.18.2",
"eslint": "^8.17.0",
"@babel/core": "^7.24.9",
"@babel/eslint-parser": "^7.24.8",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"eslint": "^8.57.0",
"eslint-cli": "^1.1.1",
"eslint-config-indico": "^2.0.0",
"eslint-config-prettier": "^8.5.0",

10
tsconfig.json Normal file
View File

@ -0,0 +1,10 @@
{
"extends": "../../src/tsconfig.json",
"compilerOptions": {
"baseUrl": "../../src",
},
"include": [
"../../src/indico/web/client/js/types",
"vc_zoom/indico_vc_zoom/client/**/*",
]
}