mirror of
https://github.com/nextcloud/richdocuments.git
synced 2025-12-17 13:08:43 +01:00
chore: Also handle typescript files in eslint
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
f42ab52037
commit
369c33ce8a
4 changed files with 6 additions and 11 deletions
|
|
@ -15,6 +15,7 @@ module.exports = {
|
|||
},
|
||||
extends: [
|
||||
'@nextcloud',
|
||||
'@nextcloud/eslint-config/typescript',
|
||||
'plugin:cypress/recommended',
|
||||
],
|
||||
env: {
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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/,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue