Skip to content

Commit

Permalink
Merge pull request #340 from matematikk-mooc/Kursp-853-Therese-persen…
Browse files Browse the repository at this point in the history
…-project-specific-linting

KURSP-853-install dependencies and update files to set up linting rules
  • Loading branch information
madsenandreas authored Nov 6, 2023
2 parents 3a0fba1 + 171e337 commit f8fa9be
Show file tree
Hide file tree
Showing 6 changed files with 562 additions and 31 deletions.
14 changes: 0 additions & 14 deletions .eslintrc

This file was deleted.

33 changes: 33 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module.exports = {
root: true,
env: {
node: true
},
extends: [
'plugin:vue/recommended', // Use the recommended Vue.js rules
'eslint:recommended',
'plugin:jquery/recommended',
'prettier' // Enable ESLint and Prettier integration
],
plugins: ['vue', 'prettier',],
rules: {
semi: ['error', 'always']
},
// Prettier-specific options
overrides: [
{
files: ['*.vue', '*.scss'], // Apply Prettier to Vue and SCSS files
options: {
// Prettier options specific to Vue and SCSS files
singleQuote: true,
htmlWhitespaceSensitivity: 'css',
vueIndentScriptAndStyle: true,
tabWidth: 2,
semi: true,
useTabs: false,
trailingComma: 'none',
scss: true
}
}
]
};
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
singleQuote: true,
semi: true,
trailingComma: 'all',
};
13 changes: 13 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"include": ["src/**/*.js", "src/**/*.ts",
"./src/vue/src*.vue"],
"exclude": ["node_modules", "dist"]
}
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.8.1",
"css-minimizer-webpack-plugin": "^5.0.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-jquery": "^1.5.1",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-vue": "^9.18.1",
"file-loader": "^6.2.0",
"glob": "^10.2.6",
"handlebars": "^4.7.7",
Expand All @@ -41,6 +46,7 @@
"less-plugin-autoprefix": "^1.5.1",
"mini-css-extract-plugin": "^2.7.6",
"node-sass": "^9.0.0",
"prettier": "^3.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"replace-in-file-webpack-plugin": "^1.0.6",
Expand Down
Loading

0 comments on commit f8fa9be

Please sign in to comment.