Commit 531ae17b authored by Adam Parák's avatar Adam Parák 💬
Browse files

Merge branch '666-eslint' into 'main'

fix(#666): improve turbo script, add exclusion to dist folder

Closes #666

See merge request inject/frontend!583
parents 7bc423a8 24bd387c
Loading
Loading
Loading
Loading
+1 −15
Original line number Diff line number Diff line
@@ -10,23 +10,9 @@ import tseslint from 'typescript-eslint'
import reactCompiler from 'eslint-plugin-react-compiler'
import turboPlugin from 'eslint-plugin-turbo'

const wrapInIgnorance = arrOrObj => {
  const wrap = obj => ({
    files: ['**/*.{ts,tsx,js,jsx}'],
    ignores: ['**/lib, **/node_modules'],
  })
  if (Array.isArray(arrOrObj)) {
    return arrOrObj.map(wrap)
  }
  if (typeof arrOrObj === 'object') {
    return [wrap(arrOrObj)]
  }
  throw Error('Typing error')
}

export const config = tseslint.config(
  {
    ignores: ['**/lib/**', 'eslint.config.mjs'],
    ignores: ['**/lib/**', 'eslint.config.mjs', '**/dist/**'],
  },
  {
    files: ['**/*.{ts,tsx,js,jsx}'],
+5 −1
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
      "dependsOn": ["check-types", "eslint", "^build"]
    },
    "check-types": {
      "inputs": ["!dist/**", "**/*.{ts,tsx}", "yarn.lock", "package.json"],
      "dependsOn": ["^check-types"]
    },
    "dev:editor": {
@@ -16,8 +17,11 @@
      "persistent": true,
      "cache": false
    },
    "eslint": {},
    "eslint": {
      "inputs": ["!dist/**"]
    },
    "eslint-gitlab": {
      "inputs": ["!dist/**"],
      "outputLogs": "full",
      "env": ["ESLINT_CODE_QUALITY_REPORT"]
    },