add travis and eslint

This commit is contained in:
Michael Schramm 2020-06-09 11:08:38 +02:00
parent ef250af6cb
commit c2608f047e
7 changed files with 833 additions and 20 deletions

22
.eslintrc.js Normal file
View File

@ -0,0 +1,22 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: { jsx: true }
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
"plugin:jsx-a11y/recommended",
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
rules: {
'prettier/prettier': [
"error", {}, { "usePrettierrc": true }
],
'react/prop-types': 'off',
},
};

8
.prettierrc.js Normal file
View File

@ -0,0 +1,8 @@
module.exports = {
semi: false,
trailingComma: 'es5',
singleQuote: true,
printWidth: 100,
tabWidth: 2,
useTabs: false,
}

12
.travis.yml Normal file
View File

@ -0,0 +1,12 @@
language: node_js
node_js:
- 8
cache:
directories:
- node_modules
script:
- yarn
- yarn lint
- yarn build

View File

@ -1,7 +1,15 @@
# OhMyForm UI
[![Financial Contributors on Open Collective](https://opencollective.com/ohmyform-sustainability/all/badge.svg?label=financial+contributors)](https://opencollective.com/ohmyform-sustainability)
![Project Status](https://img.shields.io/badge/status-0.9.0-green.svg)
![Project Status](https://badgen.net/github/checks/ohmyform/ui)
![Latest Release](https://badgen.net/github/tag/ohmyform/ui)
![Docker Pulls](https://badgen.net/docker/pulls/ohmyform/ui)
[![Lokalise](https://badgen.net/badge/Lokalise/EN/green?icon=libraries)](https://app.lokalise.com/public/379418475ede5d5c6937b0.31012044/)
![Last Commit](https://badgen.net/github/last-commit/ohmyform/ui)
> An *open source alternative to TypeForm* that can create stunning mobile-ready forms, surveys and questionnaires.
[![Discord](https://img.shields.io/discord/595773457862492190.svg?label=Discord%20Chat)](https://discord.gg/MJqAuAZ)
> An *open source alternative to TypeForm* that can create stunning mobile-ready forms, surveys and questionnaires.
[![Financial Contributors on Open Collective](https://opencollective.com/ohmyform-sustainability/all/badge.svg?label=financial+contributors)](https://opencollective.com/ohmyform-sustainability)

View File

@ -1,3 +0,0 @@
files:
- source: /locales/en/*.json
translation: /locales/%two_letters_code%/%original_file_name%

View File

@ -5,6 +5,7 @@
"scripts": {
"start:dev": "next dev -p 4000",
"build": "next build",
"lint": "eslint pages/ store/ components/ graphql/",
"export": "cross-env SPA=1 next build && next export",
"start": "next start -p $PORT",
"translation:sort": "cross-env TS_NODE_TRANSPILE_ONLY=true ts-node-script locales/sort.ts",
@ -43,9 +44,18 @@
"devDependencies": {
"@types/node": "^14.0.1",
"@types/react": "^16.9.35",
"@typescript-eslint/eslint-plugin": "^3.2.0",
"@typescript-eslint/parser": "^3.2.0",
"commander": "^5.1.0",
"eslint": "^7.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4.0.4",
"glob": "^7.1.6",
"lodash.merge": "^4.6.2",
"prettier": "^2.0.5",
"ts-node": "^8.10.2",
"typescript": "^3.9.2"
}

784
yarn.lock

File diff suppressed because it is too large Load Diff