diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..48fa262f --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,43 @@ +module.exports = { + 'env': { + 'browser': true, + 'es6': true, + 'commonjs': true, + 'jquery': true + }, + 'extends': 'eslint:recommended', + 'parserOptions': { + 'ecmaVersion': 6 + }, + 'rules': { + 'indent': [ + 'error', + 'tab', + { + 'SwitchCase': 1 + } + ], + 'linebreak-style': [ + 'error', + 'unix' + ], + 'quotes': [ + 'error', + 'single' + ], + 'semi': [ + 'error', + 'always' + ], + 'no-console': 'off', + 'no-unused-vars': [ + 'error', { + 'vars': 'all', + 'args': 'after-used', + 'ignoreRestSiblings': false + } + ], + // Requires eslint >= v8.14.0 + 'no-constant-binary-expression': 'error' + } +}; diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 00000000..9a284483 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "ESNext", + "moduleResolution": "Node", + "target": "ES2020", + "jsx": "react", + "allowImportingTsExtensions": true, + "strictNullChecks": true, + "strictFunctionTypes": true + }, + "exclude": [ + "node_modules", + "**/node_modules/*" + ] +}