mirror of
https://github.com/unraid/api.git
synced 2026-01-02 14:40:01 -06:00
feat: eslint setup
This commit is contained in:
23
.eslintrc.cjs
Normal file
23
.eslintrc.cjs
Normal file
@@ -0,0 +1,23 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const { readFileSync } = require('fs');
|
||||
const dotenv = require('dotenv');
|
||||
|
||||
const envConfig = dotenv.parse(readFileSync('.env'));
|
||||
for (const k in envConfig) {
|
||||
process.env[k] = envConfig[k];
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
extends: ['@nuxtjs/eslint-config-typescript'],
|
||||
rules: {
|
||||
'comma-dangle': ['warn', 'only-multiline'],
|
||||
semi: ['error', 'always'],
|
||||
quotes: ['warn', 'single'],
|
||||
'no-console': (process.env.NODE_ENV === 'production' ? 'error' : 'off'),
|
||||
'no-debugger': (process.env.NODE_ENV === 'production' ? 'error' : 'off'),
|
||||
'@typescript-eslint/no-unused-vars': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
|
||||
'max-len': 'off',
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/v-on-event-hyphenation': 'off'
|
||||
}
|
||||
};
|
||||
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@@ -1,4 +1,8 @@
|
||||
{
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll": false,
|
||||
"source.fixAll.eslint": true
|
||||
},
|
||||
"workbench.colorCustomizations": {
|
||||
"activityBar.activeBackground": "#78797d",
|
||||
"activityBar.background": "#78797d",
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
import dotenv from 'dotenv';
|
||||
import { readFileSync } from 'fs';
|
||||
const envConfig = dotenv.parse(readFileSync('.env'))
|
||||
for (const k in envConfig) {
|
||||
process.env[k] = envConfig[k]
|
||||
}
|
||||
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
ssr: false,
|
||||
|
||||
2435
package-lock.json
generated
2435
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -3,13 +3,14 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"build:dev": "nuxt build && npm run deploy:dev",
|
||||
"deploy:dev": "./scripts/deploy-dev.sh",
|
||||
"dev": "nuxt dev",
|
||||
"lint": "eslint .",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare",
|
||||
"serve": "serve dist/nuxt-custom-elements/connect-components",
|
||||
"deploy:dev": "./scripts/deploy-dev.sh",
|
||||
"build:dev": "nuxt build && npm run deploy:dev",
|
||||
"codegen": "graphql-codegen --config codegen.ts -r dotenv/config",
|
||||
"codegen:watch": "graphql-codegen --config codegen.ts --watch -r dotenv/config"
|
||||
},
|
||||
@@ -18,6 +19,8 @@
|
||||
"@graphql-codegen/client-preset": "^4.0.1",
|
||||
"@graphql-codegen/introspection": "^4.0.0",
|
||||
"@nuxt/devtools": "^0.6.1",
|
||||
"@nuxt/eslint-config": "^0.1.1",
|
||||
"@nuxtjs/eslint-config-typescript": "^12.0.0",
|
||||
"@nuxtjs/tailwindcss": "^6.7.0",
|
||||
"@types/crypto-js": "^4.1.1",
|
||||
"@types/node": "^18",
|
||||
@@ -25,6 +28,7 @@
|
||||
"@vueuse/core": "^10.1.2",
|
||||
"@vueuse/nuxt": "^10.1.2",
|
||||
"amazon-cognito-identity-js": "^6.2.0",
|
||||
"eslint": "^8.45.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"nuxt": "^3.5.1",
|
||||
"nuxt-custom-elements": "^2.0.0-beta.12"
|
||||
|
||||
Reference in New Issue
Block a user