Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #14 from oae/refactor/rewrite
Browse files Browse the repository at this point in the history
refactor: re-write code in typescript
  • Loading branch information
oae authored Apr 9, 2020
2 parents 4f6a56f + 180dbfe commit 588117f
Show file tree
Hide file tree
Showing 44 changed files with 7,326 additions and 1,632 deletions.
20 changes: 3 additions & 17 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true


[*]

# change these settings to your own preference
indent_style = space
indent_size = 2

# we recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
insert_final_newline = false

[*.json]
indent_style = space
indent_size = 2
[*.{js,ts}]
quote_type = single
14 changes: 14 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# don't ever lint node_modules
node_modules/
# don't lint build output (make sure it's set to your correct build folder name)
lib/
tmp/
test/*.js
# don't lint templates
templates/
# temporary ignore examples
# examples/
# temporary ignore generated types, remove this if the heap out of memory bug is fixed
@types/
*.js
*/*.js
21 changes: 21 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// see https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project
module.exports = {
root: true,
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
rules: {
'quotes': [2, 'single', { 'avoidEscape': true }],
'no-debugger': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-misused-new': 'off',
'@typescript-eslint/triple-slash-reference': 'off',
'@typescript-eslint/no-unused-vars': 'error',
// For Gjs
'camelcase': 'off',
'@typescript-eslint/camelcase': 'off'
}
};
207 changes: 206 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

# Created by https://www.gitignore.io/api/vim,linux,sublimetext,visualstudiocode
# Created by https://www.gitignore.io/api/node,linux,webstorm,sublimetext,visualstudiocode
# Edit at https://www.gitignore.io/?templates=node,linux,webstorm,sublimetext,visualstudiocode

### Linux ###
*~
Expand All @@ -16,6 +17,112 @@
# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# rollup.js default build output
dist/

# Uncomment the public line if your project uses Gatsby
# https://nextjs.org/blog/next-9-1#public-directory-support
# https://create-react-app.dev/docs/using-the-public-folder/#docsNav
# public

# Storybook build outputs
.out
.storybook-out

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Temporary folders
tmp/
temp/

### SublimeText ###
# Cache files for Sublime Text
*.tmlanguage.cache
Expand Down Expand Up @@ -78,3 +185,101 @@ tags
gschemas.compiled
extensions-sync@elhan.io*.zip
_build
node_modules
@types
dist
### VisualStudioCode Patch ###
# Ignore all local history of files
.history

### WebStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### WebStorm Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
.idea/**/sonarlint/

# SonarQube Plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator/

# End of https://www.gitignore.io/api/node,linux,webstorm,sublimetext,visualstudiocode

# ts-for-gjs output
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: true,
printWidth: 120,
tabWidth: 2,
};
12 changes: 12 additions & 0 deletions .ts-for-girrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
environments: ['gjs'],
modules: ['Gtk-3.0', 'Soup-2.4', 'St-1.0'],
prettify: true,
girDirectories: [
'/usr/share/gir-1.0',
'/usr/share/gnome-shell',
'/usr/lib/mutter-6'
],
outdir: './@types',
ignore: []
}
5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

55 changes: 0 additions & 55 deletions .vscode/tasks.json

This file was deleted.

Loading

0 comments on commit 588117f

Please sign in to comment.