♻️ Add shared eslint config
This commit is contained in:
@ -1,2 +0,0 @@
|
||||
*.js
|
||||
*.html
|
@ -1,12 +1,5 @@
|
||||
module.exports = {
|
||||
parser: "@typescript-eslint/parser",
|
||||
plugins: ["@typescript-eslint", "prettier"],
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
],
|
||||
rules: {
|
||||
"no-unused-vars": "off",
|
||||
"@typescript-eslint/no-unused-vars": ["off"],
|
||||
},
|
||||
};
|
||||
root: true,
|
||||
extends: ['custom'],
|
||||
ignorePatterns: ['/tests'],
|
||||
}
|
||||
|
@ -7,22 +7,19 @@
|
||||
"scripts": {
|
||||
"dev": "tsup --watch",
|
||||
"build": "tsup",
|
||||
"lint": "eslint src --ext .ts && eslint tests --ext .ts",
|
||||
"lint": "eslint \"src/**/*.ts*\"",
|
||||
"test": "pnpm jest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "29.2.3",
|
||||
"@typescript-eslint/eslint-plugin": "5.43.0",
|
||||
"@typescript-eslint/parser": "5.43.0",
|
||||
"baptistearno-tsup": "^0.1.0",
|
||||
"eslint": "8.27.0",
|
||||
"eslint-plugin-functional": "4.4.1",
|
||||
"eslint-plugin-jest": "27.1.5",
|
||||
"eslint-plugin-prettier": "4.2.1",
|
||||
"tsup": "6.5.0",
|
||||
"eslint": "8.28.0",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"jest": "29.3.1",
|
||||
"jest-environment-jsdom": "29.3.1",
|
||||
"prettier": "2.7.1",
|
||||
"ts-jest": "29.0.3",
|
||||
"typescript": "4.8.4"
|
||||
"typescript": "4.8.4",
|
||||
"tsconfig": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ export {
|
||||
hideMessage,
|
||||
}
|
||||
|
||||
export default {
|
||||
const defaultExports = {
|
||||
initContainer,
|
||||
initPopup,
|
||||
initBubble,
|
||||
@ -29,4 +29,6 @@ export default {
|
||||
hideMessage,
|
||||
}
|
||||
|
||||
export default defaultExports
|
||||
|
||||
export * from './types'
|
||||
|
@ -3,11 +3,9 @@ import { initContainer } from '../src/embedTypes/container'
|
||||
const observe = jest.fn()
|
||||
const unobserve = jest.fn()
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
window.IntersectionObserver = jest.fn(() => ({
|
||||
observe,
|
||||
unobserve,
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
})) as any
|
||||
|
||||
describe('initContainer', () => {
|
||||
|
@ -1,10 +1,5 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"moduleResolution": "Node",
|
||||
"declarationDir": ".",
|
||||
"strict": true
|
||||
},
|
||||
"include": ["./src/**/*.ts"],
|
||||
"exclude": ["./tests/**/*"]
|
||||
"extends": "tsconfig/base.json",
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["dist", "node_modules"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { defineConfig } from 'baptistearno-tsup'
|
||||
import { defineConfig } from 'tsup'
|
||||
|
||||
export default defineConfig((options) => ({
|
||||
entry: ['src/index.ts'],
|
||||
|
Reference in New Issue
Block a user