chore: Also handle typescript files in eslint

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2024-06-13 14:27:59 +02:00
parent f42ab52037
commit 369c33ce8a
No known key found for this signature in database
GPG key ID: 4C614C6ED2CDE6DF
4 changed files with 6 additions and 11 deletions

View file

@ -15,6 +15,7 @@ module.exports = {
},
extends: [
'@nextcloud',
'@nextcloud/eslint-config/typescript',
'plugin:cypress/recommended',
],
env: {

View file

@ -15,8 +15,8 @@
"build": "NODE_ENV=production webpack --progress --config webpack.js",
"dev": "NODE_ENV=development webpack --progress --config webpack.js",
"watch": "NODE_ENV=development webpack --progress --watch --config webpack.js",
"lint": "eslint --ext .js,.vue src",
"lint:fix": "eslint --ext .js,.vue src --fix",
"lint": "eslint --ext .js,.vue,.ts,.tsx src",
"lint:fix": "eslint --ext .js,.vue,.ts,.tsx src --fix",
"lint:cypress": "eslint --ext .js cypress",
"stylelint": "stylelint src/**/*.vue src/**/*.scss src/**/*.css css/*.scss",
"stylelint:fix": "stylelint src/**/*.vue src/**/*.scss src/**/*.css css/*.scss --fix",

View file

@ -9,9 +9,10 @@
"jsx": "react",
"allowJs": true
},
"include": ["src/**/*.tsx"],
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": [
"node_modules",
"vendor"
]
],
"typeRoots": ["node_modules/@types", "src/types"]
}

View file

@ -28,13 +28,6 @@ webpackRules.RULE_JS.exclude = BabelLoaderExcludeNodeModulesExcept([
// Replaces rules array
webpackConfig.module.rules = Object.values(webpackRules)
// Add typescript rule
webpackConfig.module.rules.push({
test: /\.tsx?$/,
use: ['babel-loader', 'ts-loader'],
exclude: /node_modules/,
})
// Raw files rule
webpackConfig.module.rules.push({
resourceQuery: /raw/,