Skip to content

Commit b075ab6

Browse files
Eslint airbnb migration and error fixes (#687)
Co-authored-by: Joana Maia <joana@crowd.dev>
1 parent e723a6f commit b075ab6

624 files changed

Lines changed: 29783 additions & 27959 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

frontend/.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
**/*.spec.js
2+
cypress
3+
coverage
4+
dist
5+
tests
6+
tailwind.config.js
7+
cypress.config.js
8+
cypress.staging.config.js

frontend/.eslintrc.js

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,68 @@ module.exports = {
22
root: true,
33

44
env: {
5-
node: true
5+
node: true,
66
},
77

88
extends: [
99
'plugin:vue/vue3-recommended',
10-
'eslint:recommended',
11-
'@vue/prettier'
10+
'@vue/airbnb',
1211
],
1312

1413
parserOptions: {
15-
ecmaVersion: 2020
14+
ecmaVersion: 2020,
1615
},
1716

1817
rules: {
19-
'no-console': [
20-
'warn',
21-
{
22-
allow: ['error', 'info']
23-
}
24-
],
18+
'no-console':
19+
process.env.NODE_ENV === 'production'
20+
? 'warn'
21+
: 'off',
2522
'no-debugger':
2623
process.env.NODE_ENV === 'production'
2724
? 'warn'
2825
: 'off',
29-
'vue/no-v-html': 'off',
26+
semi: 'warn',
27+
'comma-dangle': 'warn',
3028
'vue/no-unused-components': 'warn',
31-
'no-unused-vars': 'warn'
32-
}
33-
}
29+
'vue/html-indent': 'warn',
30+
'vue/html-self-closing': 'warn',
31+
'vue/no-v-html': 'off',
32+
'no-unused-vars': 'off',
33+
'import/prefer-default-export': 'off',
34+
'class-methods-use-this': 'off',
35+
'vuejs-accessibility/mouse-events-have-key-events': 'off',
36+
'vuejs-accessibility/click-events-have-key-events': 'off',
37+
'func-names': 'off',
38+
'import/no-cycle': 'off',
39+
'vue/max-len': [
40+
'error',
41+
{
42+
code: 150,
43+
ignoreComments: true,
44+
ignoreUrls: true,
45+
},
46+
],
47+
'import/extensions': [
48+
'error',
49+
'ignorePackages',
50+
{
51+
js: 'never',
52+
jsx: 'never',
53+
ts: 'never',
54+
tsx: 'never',
55+
},
56+
],
57+
},
58+
settings: {
59+
'import/resolver': {
60+
alias: {
61+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
62+
map: [
63+
['@', './src'],
64+
['@formbricks', './node_modules/@formbricks'],
65+
],
66+
},
67+
},
68+
},
69+
};

frontend/.prettierrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

frontend/babel.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
presets: ['@vue/cli-plugin-babel/preset'],
3-
plugins: ['@babel/plugin-transform-runtime']
4-
}
3+
plugins: ['@babel/plugin-transform-runtime'],
4+
};

frontend/cypress.config.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
const { defineConfig } = require('cypress')
2-
const webpackConfig = require('@vue/cli-service/webpack.config.js')
1+
const { defineConfig } = require('cypress');
2+
const webpackConfig = require('@vue/cli-service/webpack.config.js');
33
require('dotenv').config({
4-
path: './.env.cypress'
5-
})
4+
path: './.env.cypress',
5+
});
66

77
module.exports = defineConfig({
88
e2e: {
99
baseUrl: 'http://localhost:8081',
1010
specPattern: 'tests/e2e/*.spec.js',
11-
supportFile: 'tests/support/index.js'
11+
supportFile: 'tests/support/index.js',
1212
},
1313
folders: {
1414
fixturesFolder: 'tests/fixtures',
1515
screenshotsFolder: 'tests/screenshots',
16-
videosFolder: 'tests/videos'
16+
videosFolder: 'tests/videos',
1717
},
1818
component: {
1919
devServer: {
2020
framework: 'vue',
2121
bundler: 'webpack',
22-
webpackConfig
23-
}
22+
webpackConfig,
23+
},
2424
},
2525
browser: {
26-
chromeWebSecurity: false
26+
chromeWebSecurity: false,
2727
},
2828
env: {
2929
appUrl: 'http://localhost:8081',
3030
apiUrl: 'http://localhost:8080',
3131
MAILOSAUR_API_KEY: process.env.MAILOSAUR_API_KEY,
32-
MAILOSAUR_SERVER_ID: process.env.MAILOSAUR_SERVER_ID
33-
}
34-
})
32+
MAILOSAUR_SERVER_ID: process.env.MAILOSAUR_SERVER_ID,
33+
},
34+
});

frontend/cypress.staging.config.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
const { defineConfig } = require('cypress')
2-
const webpackConfig = require('@vue/cli-service/webpack.config.js')
1+
const { defineConfig } = require('cypress');
2+
const webpackConfig = require('@vue/cli-service/webpack.config.js');
33
require('dotenv').config({
4-
path: './.env.cypress'
5-
})
4+
path: './.env.cypress',
5+
});
66

77
module.exports = defineConfig({
88
e2e: {
99
baseUrl: 'https://apptest-kube.crowd.dev',
1010
specPattern: 'tests/e2e/*.spec.js',
11-
supportFile: 'tests/support/index.js'
11+
supportFile: 'tests/support/index.js',
1212
},
1313
folders: {
1414
fixturesFolder: 'tests/fixtures',
1515
screenshotsFolder: 'tests/screenshots',
16-
videosFolder: 'tests/videos'
16+
videosFolder: 'tests/videos',
1717
},
1818
component: {
1919
devServer: {
2020
framework: 'vue',
2121
bundler: 'webpack',
22-
webpackConfig
23-
}
22+
webpackConfig,
23+
},
2424
},
2525
browser: {
26-
chromeWebSecurity: false
26+
chromeWebSecurity: false,
2727
},
2828
env: {
2929
appUrl: 'https://apptest-kube.crowd.dev',
3030
apiUrl: 'https://apptest-kube.crowd.dev/api',
3131
MAILOSAUR_API_KEY: process.env.MAILOSAUR_API_KEY,
32-
MAILOSAUR_SERVER_ID: process.env.MAILOSAUR_SERVER_ID
33-
}
34-
})
32+
MAILOSAUR_SERVER_ID: process.env.MAILOSAUR_SERVER_ID,
33+
},
34+
});

0 commit comments

Comments
 (0)