mirror of
https://github.com/nextcloud/richdocuments.git
synced 2025-12-17 21:12:14 +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: [
|
extends: [
|
||||||
'@nextcloud',
|
'@nextcloud',
|
||||||
|
'@nextcloud/eslint-config/typescript',
|
||||||
'plugin:cypress/recommended',
|
'plugin:cypress/recommended',
|
||||||
],
|
],
|
||||||
env: {
|
env: {
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@
|
||||||
"build": "NODE_ENV=production webpack --progress --config webpack.js",
|
"build": "NODE_ENV=production webpack --progress --config webpack.js",
|
||||||
"dev": "NODE_ENV=development webpack --progress --config webpack.js",
|
"dev": "NODE_ENV=development webpack --progress --config webpack.js",
|
||||||
"watch": "NODE_ENV=development webpack --progress --watch --config webpack.js",
|
"watch": "NODE_ENV=development webpack --progress --watch --config webpack.js",
|
||||||
"lint": "eslint --ext .js,.vue src",
|
"lint": "eslint --ext .js,.vue,.ts,.tsx src",
|
||||||
"lint:fix": "eslint --ext .js,.vue src --fix",
|
"lint:fix": "eslint --ext .js,.vue,.ts,.tsx src --fix",
|
||||||
"lint:cypress": "eslint --ext .js cypress",
|
"lint:cypress": "eslint --ext .js cypress",
|
||||||
"stylelint": "stylelint src/**/*.vue src/**/*.scss src/**/*.css css/*.scss",
|
"stylelint": "stylelint src/**/*.vue src/**/*.scss src/**/*.css css/*.scss",
|
||||||
"stylelint:fix": "stylelint src/**/*.vue src/**/*.scss src/**/*.css css/*.scss --fix",
|
"stylelint:fix": "stylelint src/**/*.vue src/**/*.scss src/**/*.css css/*.scss --fix",
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,10 @@
|
||||||
"jsx": "react",
|
"jsx": "react",
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.tsx"],
|
"include": ["src/**/*.ts", "src/**/*.tsx"],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules",
|
"node_modules",
|
||||||
"vendor"
|
"vendor"
|
||||||
]
|
],
|
||||||
|
"typeRoots": ["node_modules/@types", "src/types"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,13 +28,6 @@ webpackRules.RULE_JS.exclude = BabelLoaderExcludeNodeModulesExcept([
|
||||||
// Replaces rules array
|
// Replaces rules array
|
||||||
webpackConfig.module.rules = Object.values(webpackRules)
|
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
|
// Raw files rule
|
||||||
webpackConfig.module.rules.push({
|
webpackConfig.module.rules.push({
|
||||||
resourceQuery: /raw/,
|
resourceQuery: /raw/,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue