Skip to content

Commit

Permalink
chore: cleanup files and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bcakmakoglu committed Feb 15, 2024
1 parent 5f8b97d commit 2ba2f9b
Show file tree
Hide file tree
Showing 39 changed files with 24,719 additions and 19,670 deletions.
58 changes: 58 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"root": true,
"extends": [
"@antfu",
"plugin:prettier/recommended",
"plugin:cypress/recommended"
],
"plugins": [
"prettier"
],
"rules": {
"curly": [
"error",
"all"
],
"vue/no-setup-props-destructure": 0,
"no-console": [
"error",
{
"allow": [
"warn",
"error"
]
}
],
"unused-imports/no-unused-vars": 0,
"@typescript-eslint/no-use-before-define": 0,
"eqeqeq": 0,
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"prettier/prettier": [
"error",
{
"singleQuote": true,
"trailingComma": "all",
"semi": false,
"quoteProps": "consistent",
"bracketSpacing": true,
"printWidth": 130
}
],
"antfu/if-newline": 0,
"antfu/generic-spacing": 0,
// typescript
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/ban-types": "off",
// stylistic
"@stylistic/ts/member-delimiter-style": "off",
"@stylistic/ts/brace-style": "off",
"@stylistic/js/operator-linebreak": "off",
"@stylistic/ts/indent": "off"
}
}
39 changes: 0 additions & 39 deletions .eslintrc.js

This file was deleted.

8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

34 changes: 17 additions & 17 deletions cypress/integration/1-tests/draggable.spec.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
/// <reference types="cypress" />
describe('draggable', () => {
beforeEach(() => {
cy.visit('http://localhost:3000');
});
cy.visit('http://localhost:3000')
})

it('Displays the example page and moves boxes around', () => {
cy.get('#app').should('be.visible');
cy.get('#app').should('be.visible')
cy.get('#app')
.get('.wrapper-box')
.should('have.length.at.least', 1)
.should('have.class', 'revue-draggable')
.each((el) => {
const originalPosition = el.position();
const box = Cypress.$(el)[0];
const coords = { x: 200, y: 300 };
box.dispatchEvent(new MouseEvent('mousedown'));
box.dispatchEvent(new MouseEvent('mousemove', { x: 10, y: 0 }));
const originalPosition = el.position()
const box = Cypress.$(el)[0]
const coords = { x: 200, y: 300 }
box.dispatchEvent(new MouseEvent('mousedown'))
box.dispatchEvent(new MouseEvent('mousemove', { x: 10, y: 0 }))
box.dispatchEvent(
new MouseEvent('mousemove', {
clientX: coords.x + 10,
clientY: coords.y + 10
})
);
expect(el.position()).exist;
expect(originalPosition).not.eq(el.position());
box.dispatchEvent(new MouseEvent('mouseup'));
});
});
});
clientY: coords.y + 10,
}),
)
expect(el.position()).exist
expect(originalPosition).not.eq(el.position())
box.dispatchEvent(new MouseEvent('mouseup'))
})
})
})
14 changes: 7 additions & 7 deletions docs/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import theme from '@nuxt/content-theme-docs';
import theme from '@nuxt/content-theme-docs'

export default theme({
docs: {
primaryColor: '#426dbe'
primaryColor: '#426dbe',
},
loading: { color: '#00CD81' },
i18n: {
Expand All @@ -11,9 +11,9 @@ export default theme({
code: 'en',
iso: 'en-US',
file: 'en-US.js',
name: 'English'
}
name: 'English',
},
],
defaultLocale: 'en'
}
});
defaultLocale: 'en',
},
})
Loading

0 comments on commit 2ba2f9b

Please sign in to comment.