pgadmin4/web/.eslintrc.js

94 lines
2.1 KiB
JavaScript
Raw Normal View History

2019-01-02 04:24:12 -06:00
/////////////////////////////////////////////////////////////
//
// pgAdmin 4 - PostgreSQL Tools
//
2023-01-02 00:23:55 -06:00
// Copyright (C) 2013 - 2023, The pgAdmin Development Team
2019-01-02 04:24:12 -06:00
// This software is released under the PostgreSQL Licence
//
//////////////////////////////////////////////////////////////
2017-06-12 10:55:14 -05:00
module.exports = {
'env': {
'browser': true,
'es6': true,
'amd': true,
'jasmine': true,
},
'extends': [
'eslint:recommended',
'plugin:react/recommended',
/* Uncomment the below line to use linter error for React Hooks.
By Default commented so that builds are generated successfully.
Once all the errors will be resolved will uncomment it and commit it.
*/
// "plugin:react-hooks/recommended",
],
'parser': '@babel/eslint-parser',
2017-06-12 10:55:14 -05:00
'parserOptions': {
'requireConfigFile': false,
'ecmaVersion': 2018,
'ecmaFeatures': {
'jsx': true,
},
'sourceType': 'module',
'babelOptions': {
'plugins': [
'@babel/plugin-syntax-jsx',
'@babel/plugin-proposal-class-properties',
],
},
2017-06-12 10:55:14 -05:00
},
'plugins': [
'react',
'@babel',
2017-06-12 10:55:14 -05:00
],
'overrides': [
{
'files': ['**/*.ts', '**/*.tsx'],
'plugins': [
'@typescript-eslint',
],
'extends': ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/eslint-recommended'],
'parser': '@typescript-eslint/parser',
'rules': {
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/no-this-alias': ['off'],
}
},
],
2017-06-12 10:55:14 -05:00
'globals': {
'_': true,
'module': true,
},
'rules': {
'indent': [
'error',
2,
2017-06-12 10:55:14 -05:00
],
'linebreak-style': 0,
2017-06-12 10:55:14 -05:00
'quotes': [
'error',
'single',
2017-06-12 10:55:14 -05:00
],
'semi': [
'error',
'always',
2017-06-12 10:55:14 -05:00
],
'comma-dangle': [
'error',
'only-multiline',
2017-06-13 03:50:41 -05:00
],
'no-console': ['error', { allow: ['warn', 'error'] }],
// We need to exclude below for RegEx case
'no-useless-escape': 0,
'no-prototype-builtins': 0,
'no-global-assign': 0,
'no-import-assign': 0,
},
'settings': {
'react': {
'version': 'detect',
},
},
};