1
0
mirror of https://github.com/webstudio-is/webstudio.git synced 2025-03-15 09:45:09 +00:00
webstudio/eslint.config.mjs
Ivan Starkov ca4b0f89bc experimental: Animation publishing ()
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2025-03-11 11:19:01 +05:00

56 lines
1.6 KiB
JavaScript

// @ts-check
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import reactHooks from "eslint-plugin-react-hooks";
import unicorn from "eslint-plugin-unicorn";
export default tseslint.config({
files: ["**/*.{ts,tsx}"],
ignores: [
"**/*.d.ts",
"**/__generated__/**",
"codemod/**",
"packages/*/lib/**",
"packages/prisma-client/prisma/migrations/**",
"packages/cli/templates/**",
"fixtures/**",
"packages/sdk-components-animation/private-src/polyfill/**",
"packages/sdk-components-animation/private-src/perf/**",
],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
{
plugins: {
"react-hooks": /** @type {any} */ (reactHooks),
unicorn,
},
},
],
// @ts-ignore
rules: {
...reactHooks.configs.recommended.rules,
"no-console": ["error", { allow: ["info", "warn", "error"] }],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-expressions": "off",
"func-style": ["error", "expression", { allowArrowFunctions: true }],
curly: "error",
eqeqeq: ["error", "always", { null: "ignore" }],
camelcase: ["error", { properties: "never" }],
radix: "error",
"unicorn/filename-case": ["error", { case: "kebabCase" }],
"unicorn/prefer-node-protocol": "error",
"no-restricted-syntax": [
"error",
{
message:
"Do not import default from React, use a named imports instead",
selector:
'ImportDeclaration[source.value="react"] ImportDefaultSpecifier',
},
],
},
});