codekingpro/portable-devtools
114k
1/////////////////////////////////////////////////////////////2//3// pgAdmin 4 - PostgreSQL Tools4//5// Copyright (C) 2013 - 2024, The pgAdmin Development Team6// This software is released under the PostgreSQL Licence7//8//////////////////////////////////////////////////////////////9 10module.exports = {11 'env': {12 'browser': true,13 'es6': true,14 'amd': true,15 },16 'extends': [17 'eslint:recommended',18 'plugin:react/recommended',19 /* Uncomment the below line to use linter error for React Hooks.20 By Default commented so that builds are generated successfully.21 Once all the errors will be resolved will uncomment it and commit it.22 */23 // "plugin:react-hooks/recommended",24 ],25 'parser': '@babel/eslint-parser',26 'parserOptions': {27 'requireConfigFile': false,28 'ecmaVersion': 2018,29 'ecmaFeatures': {30 'jsx': true,31 },32 'sourceType': 'module',33 'babelOptions': {34 'plugins': [35 '@babel/plugin-syntax-jsx',36 '@babel/plugin-proposal-class-properties',37 ],38 },39 },40 'plugins': [41 'react',42 '@babel',43 'jest'44 ],45 'overrides': [46 {47 'files': ['**/*.{ts,tsx}'],48 'plugins': [49 '@typescript-eslint',50 ],51 'extends': ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/eslint-recommended'],52 'parser': '@typescript-eslint/parser',53 'rules': {54 '@typescript-eslint/no-explicit-any': ['off'],55 '@typescript-eslint/no-this-alias': ['off'],56 }57 },58 {59 'files': ['**/*{spec,test}.{js,jsx}', './regression/javascript/**/*.{js}'],60 'extends': ['eslint:recommended'],61 'env': {62 'jest': true63 }64 },65 ],66 'globals': {67 '_': true,68 'module': true,69 '__dirname': true,70 'global': true,71 'jest': true72 },73 'rules': {74 'indent': [75 'error',76 2,77 ],78 'linebreak-style': 0,79 'quotes': [80 'error',81 'single',82 ],83 'semi': [84 'error',85 'always',86 ],87 'comma-dangle': [88 'error',89 'only-multiline',90 ],91 'no-console': ['error', { allow: ['warn', 'error'] }],92 // We need to exclude below for RegEx case93 'no-useless-escape': 0,94 'no-prototype-builtins': 0,95 'no-global-assign': 0,96 'no-import-assign': 0,97 },98 'settings': {99 'react': {100 'version': 'detect',101 },102 },103};104 