From 9c44a2c9fc45e156495dabe7e21899fc46d6e685 Mon Sep 17 00:00:00 2001 From: Nate Stemen Date: Thu, 13 Dec 2018 16:55:47 -0500 Subject: [PATCH] download rc files in script and quote filenames --- services/chat/.eslintrc | 77 ----------------------------------- services/chat/decaffeinate.sh | 8 +++- 2 files changed, 7 insertions(+), 78 deletions(-) delete mode 100644 services/chat/.eslintrc diff --git a/services/chat/.eslintrc b/services/chat/.eslintrc deleted file mode 100644 index 8a19e98a6c..0000000000 --- a/services/chat/.eslintrc +++ /dev/null @@ -1,77 +0,0 @@ -{ - "extends": [ - "standard", - "standard-react", - "prettier", - "prettier/react", - "prettier/standard", - "plugin:jsx-a11y/recommended" - ], - "plugins": [ - "prettier", - "jsx-a11y", - "mocha", - "chai-expect", - "chai-friendly" - ], - "env": { - "mocha": true - }, - "globals": { - "expect": true, - "define": true, - "$": true, - "angular": true, - // Injected in layout.pug - "user_id": true - }, - "settings": { - // Tell eslint-plugin-react which version of React we are using - "react": { - "version": "15" - } - }, - "rules": { - "max-len": [ - "error", - { - "ignoreUrls": true, - // Ignore long describe/it test blocks, long import/require statements - "ignorePattern": "(^\\s*(it|describe)\\s*\\(['\"]|^import\\s*.*\\s*from\\s*['\"]|^.*\\s*=\\s*require\\(['\"])" - } - ], - // Fix conflict between prettier & standard by overriding to prefer - // double quotes - "jsx-quotes": [ - "error", - "prefer-double" - ], - // Override weird behaviour of jsx-a11y label-has-for (says labels must be - // nested *and* have for/id attributes) - "jsx-a11y/label-has-for": [ - "error", - { - "required": { - "some": [ - "nesting", - "id" - ] - } - } - ], - // Add some mocha specific rules - "mocha/handle-done-callback": "error", - "mocha/no-exclusive-tests": "error", - "mocha/no-global-tests": "error", - "mocha/no-identical-title": "error", - "mocha/no-nested-tests": "error", - "mocha/no-pending-tests": "error", - "mocha/no-skipped-tests": "error", - // Add some chai specific rules - "chai-expect/missing-assertion": "error", - "chai-expect/terminating-properties": "error", - // Swap the no-unused-expressions rule with a more chai-friendly one - "no-unused-expressions": 0, - "chai-friendly/no-unused-expressions": "error" - } -} \ No newline at end of file diff --git a/services/chat/decaffeinate.sh b/services/chat/decaffeinate.sh index 86b2b0e777..d78e339dcb 100755 --- a/services/chat/decaffeinate.sh +++ b/services/chat/decaffeinate.sh @@ -1,5 +1,11 @@ set -ex +curl -o .eslintrc https://raw.githubusercontent.com/sharelatex/web-sharelatex-internal/master/.eslintrc?token=AMHVk43L42-Htd0MSIfjao6vRukW52r4ks5cHA9WwA%3D%3D +curl -o .prettierrc https://raw.githubusercontent.com/sharelatex/web-sharelatex-internal/master/.prettierrc?token=AMHVk45yPk51AJkmy-hYGoHI9gW-kZHvks5cHAu3wA%3D%3D + +git add . +git commit -m "add rc files" + npx bulk-decaffeinate convert --dir app/coffee npx bulk-decaffeinate clean @@ -38,7 +44,7 @@ decaffeinate config/settings.defaults.js git commit -m "Decaffeinate: convert individual files to js" -npx prettier-eslint app.js Gruntfile.js config/settings.defaults.js --write +npx prettier-eslint 'app.js' 'Gruntfile.js' 'config/settings.defaults.js' --write git add . git commit -m "Prettier: convert individual decaffeinated files to Prettier format"