-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(eslint): streamline configs into flat config file (#569)
eslintrc configs are [deprecated with eslint@9^](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated) instead, [flat config files are used](https://eslint.org/docs/latest/use/configure/configuration-files) needed for #566
- Loading branch information
1 parent
7bb48b5
commit a90a75f
Showing
7 changed files
with
509 additions
and
73 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
'use strict' | ||
|
||
const eslint_js = require('@eslint/js') | ||
const eslint_ts = require('@typescript-eslint/eslint-plugin') | ||
const typescript_parser = require('@typescript-eslint/parser') | ||
const globals = require('globals') | ||
|
||
module.exports = [ | ||
// global rules for all files | ||
eslint_js.configs.recommended, | ||
// Generic config for JavaScript files: Setup environment, version, etc. | ||
{ | ||
files: ['**/*.js'], | ||
languageOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: 'commonjs', | ||
globals: { | ||
...globals.node, | ||
...globals.jest, | ||
...globals.es6, | ||
SELECT: true, | ||
INSERT: true, | ||
UPSERT: true, | ||
UPDATE: true, | ||
DELETE: true, | ||
CREATE: true, | ||
DROP: true, | ||
CDL: true, | ||
CQL: true, | ||
CXL: true, | ||
}, | ||
}, | ||
rules: { | ||
'no-extra-semi': 'off', | ||
'no-unused-vars': ['warn', { argsIgnorePattern: 'lazy' }], | ||
'no-console': 'error', | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.ts'], | ||
plugins: { | ||
'@typescript-eslint': eslint_ts, | ||
}, | ||
languageOptions: { | ||
parser: typescript_parser, | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
rules: { | ||
...eslint_ts.configs.recommended.rules, | ||
'@typescript-eslint/no-unused-vars': ['warn'], | ||
'@typescript-eslint/no-explicit-any': ['warn'], | ||
}, | ||
}, | ||
{ | ||
files: ['**/hana/**/*.js'], | ||
rules: { | ||
'no-console': 'warn', | ||
}, | ||
}, | ||
] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.