diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..32d0b99 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,32 @@ +{ + "root": true, + "env": { + "es2022": true, + "node": true, + "browser": true + }, + "parserOptions": { + "ecmaVersion": 2022, + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } + }, + "plugins": [], + "extends": [ + "eslint:recommended" + ], + "ignorePatterns": [ + "node_modules/", + "out1", + "dist/", + "build/" + ], + "overrides": [ + { + "files": ["**/*.jsx"], + "rules": {} + } + ] +} + diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..357769b --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "command": "npm start", + "name": "Run npm start", + "request": "launch", + "type": "node-terminal" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..8795c8a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "eslint.experimental.useFlatConfig": true, + "eslint.workingDirectories": [ + { + "mode": "auto" + } + ] +} + diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..ba0f7a2 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,28 @@ +export default [ + { + ignores: [ + 'node_modules', + 'out1', + 'dist', + 'build' + ] + }, + { + files: ['**/*.{js,jsx}'], + languageOptions: { + ecmaVersion: 2022, + sourceType: 'module', + globals: { + browser: true, + node: true + } + }, + rules: { + // baseline rules; extend as needed + 'no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], + 'no-undef': 'error', + 'no-console': 'off' + } + } +]; +