Skip to content

Commit

Permalink
Merge branch 'claim-airdrop' of https://github.com/godekina/spotnet i…
Browse files Browse the repository at this point in the history
…nto claim-airdrop
  • Loading branch information
godekina committed Oct 31, 2024
2 parents 6976f3d + d29fe4c commit ee211a9
Show file tree
Hide file tree
Showing 66 changed files with 13,064 additions and 8,915 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
- name: Create .env file
run: cp .env.dev .env

- name: Start services
run: docker compose -f docker-compose.dev.yaml up -d --build
run: docker compose -f docker-compose.dev.yaml up -d --build

- name: Run tests
run: |
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Pylint

on:
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
build:
Expand All @@ -13,15 +13,15 @@ jobs:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py') --disable=all --enable=C0114,C0115,C0116,C0301
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py') --disable=all --enable=C0114,C0115,C0116,C0301
2 changes: 1 addition & 1 deletion frontend/.env.dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
REACT_APP_STARKNET_NODE_URL=http://178.32.172.148:6060
REACT_APP_BACKEND_URL=http://localhost:8000
REACT_APP_BACKEND_URL=http://localhost:8000
36 changes: 36 additions & 0 deletions frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"env": {
"es6": true,
"browser": true,
"jest": true
},
"globals": {
"BigInt": "readonly",
"process": "readonly"
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2022,
"ecmaFeatures": {
"jsx": true
}
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"plugins": [
"react",
"react-hooks"
],
"rules": {
"react/prop-types": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
},
"settings": {
"react": {
"version": "detect"
}
}
}
10 changes: 10 additions & 0 deletions frontend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"semi": true,
"singleQuote": true,
"jsxSingleQuote": false,
"bracketSpacing": true,
"trailingComma": "es5",
"tabWidth": 2,
"printWidth": 120,
"endOfLine": "lf"
}
8 changes: 5 additions & 3 deletions frontend/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {
presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-react'],
};

presets: [
["@babel/preset-env", { targets: { node: "current" } }],
"@babel/preset-react",
],
};
7 changes: 4 additions & 3 deletions frontend/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
module.exports = {
setupFiles: ['./jest.setup.js'],
setupFiles: ['./jest.setup.js'],
transform: {
'^.+\\.[tj]sx?$': 'babel-jest', // Using Babel for transforming JS, JSX, TS, and TSX
},
moduleNameMapper: {
'\\.svg$': '<rootDir>/test/__mocks__/svgMock.js',
'\\.svg$': '<rootDir>/test/__mocks__/svgMock.js',
'^src/(.*)$': ['<rootDir>/src/$1'],
},
transformIgnorePatterns: [
'node_modules/(?!(axios|get-starknet)/)' // Ignore transforming node_modules
'node_modules/(?!(axios|get-starknet)/)', // Ignore transforming node_modules
],

testEnvironment: 'jsdom', // Use node as the test environment
Expand Down
2 changes: 1 addition & 1 deletion frontend/jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TextEncoder, TextDecoder } from 'util';

global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;
global.TextDecoder = TextDecoder;
6 changes: 6 additions & 0 deletions frontend/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"compilerOptions": {
"baseUrl": "src"
},
"include": ["src/**/*"]
}
Loading

0 comments on commit ee211a9

Please sign in to comment.