PluginProbe
WPIDE – File Manager & Code Editor / 3.5.9
WPIDE – File Manager & Code Editor v3.5.9
3.5.9 3.5.8 3.5.7 2.0.14 2.0.15 2.0.16 2.0.2 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1 2.2 2.3 2.3.1 2.3.2 2.4.0 2.5 2.6 3.0 3.1 3.2 3.3 All 55 releases
wpide / eslint.config.cjs

eslint.config.cjs in WPIDE – File Manager & Code Editor 3.5.9, at eslint.config.cjs

89 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 const path = require('path')
2 const js = require('@eslint/js')
3 const globals = require('globals')
4 const vue = require('eslint-plugin-vue')
5 const babelParser = require('@babel/eslint-parser')
6
7 const babelParserOptions = {
8 requireConfigFile: false,
9 babelOptions: {
10 configFile: path.join(__dirname, 'babel.config.js'),
11 },
12 }
13
14 module.exports = [
15 {
16 ignores: [
17 'deploy/**',
18 'dist/**',
19 'freemius/**',
20 'local_modules/**',
21 'node_modules/**',
22 'src/pricing/**',
23 'vendor/**',
24 ],
25 },
26 {
27 ...js.configs.recommended,
28 files: ['src/**/*.js'],
29 languageOptions: {
30 ...js.configs.recommended.languageOptions,
31 ecmaVersion: 2018,
32 sourceType: 'module',
33 parser: babelParser,
34 parserOptions: babelParserOptions,
35 globals: {
36 ajaxurl: 'readonly',
37 ...globals.browser,
38 ...globals.jquery,
39 ...globals.node,
40 jQuery: 'readonly',
41 },
42 },
43 },
44 ...vue.configs['flat/vue2-recommended'].map((config) => ({
45 ...config,
46 files: ['src/**/*.vue'],
47 languageOptions: {
48 ...config.languageOptions,
49 ecmaVersion: 2018,
50 sourceType: 'module',
51 globals: {
52 ajaxurl: 'readonly',
53 ...globals.browser,
54 ...globals.jquery,
55 ...globals.node,
56 ...(config.languageOptions?.globals || {}),
57 jQuery: 'readonly',
58 },
59 parserOptions: {
60 ...config.languageOptions?.parserOptions,
61 ...babelParserOptions,
62 parser: babelParser,
63 ecmaVersion: 2018,
64 sourceType: 'module',
65 },
66 },
67 })),
68 {
69 files: ['src/**/*.{js,vue}'],
70 rules: {
71 'linebreak-style': ['error', 'unix'],
72 'no-console': 'off',
73 'no-prototype-builtins': 'off',
74 'no-trailing-spaces': 'warn',
75 'no-unused-vars': 'error',
76 quotes: ['error', 'single'],
77 semi: ['error', 'never'],
78 'vue/attributes-order': 'off',
79 'vue/first-attribute-linebreak': 'off',
80 'vue/max-attributes-per-line': 'off',
81 'vue/multi-word-component-names': 'off',
82 'vue/no-mutating-props': 'off',
83 'vue/no-reserved-component-names': 'off',
84 'vue/no-v-text-v-html-on-component': 'off',
85 'vue/require-prop-types': 'off',
86 },
87 },
88 ]
89