From e4275e3b3b7c174380594b509a1373208c0bae8f Mon Sep 17 00:00:00 2001 From: Maxim Date: Mon, 9 Oct 2023 00:52:26 +0300 Subject: [PATCH] Add stylelint --- src/frontend/overlay/.eslintrc.js | 70 +++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/frontend/overlay/.eslintrc.js diff --git a/src/frontend/overlay/.eslintrc.js b/src/frontend/overlay/.eslintrc.js new file mode 100644 index 000000000..7fd30b042 --- /dev/null +++ b/src/frontend/overlay/.eslintrc.js @@ -0,0 +1,70 @@ +module.exports = { + "ignorePatterns": [ + "build/**" + ], + // parser: '@typescript-eslint/parser', + "env": { + "node": true, + "browser": true, + "es2021": true + }, + "extends": [ + "eslint:recommended", + "plugin:react/recommended", + "plugin:@typescript-eslint/recommended" + ], + "settings": { + "react": { + "version": "detect" + } + }, + "parserOptions": { + "ecmaFeatures": { + "jsx": true + }, + "ecmaVersion": 12, + "sourceType": "module" + }, + "plugins": [ + "@typescript-eslint", + "react" + ], + "rules": { + "indent": [ + "error", + 4 + ], + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "error", + "double" + ], + "semi": [ + "error", + "always" + ], + "eol-last": [ + "error", + "always" + ], + "no-case-declarations": "off", + "object-curly-spacing": [ + "error", + "always" + ], + "no-unused-vars": [ + "warn" + ], + "react/prop-types": [ + "off" + ], + // suppress errors for missing 'import React' in files + "react/react-in-jsx-scope": "off", + // allow jsx syntax in js files (for next.js project) + "react/jsx-filename-extension": [1, { "extensions": [".jsx", ".tsx"] }], //should add ".ts" if typescript project + }, + root: true +};