Skip to content

csci312a-s18/film-explorer-standalone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Film Explorer client

The film-explorer client was bootstrapped with Create React App (CRA) and includes all of capabilities provided by CRA. Some built-in functionality of that skeleton was stripped out, specifically the offline caching.

Setup

Run npm install to install the dependencies.

The development server will attempt to proxy API requests to the server specified in the package.json "proxy" field. Update that field to point a running server.

Development

Testing

The tests use both Jest and Enzyme has described in the CRA documentation.

Enzyme was installed with:

npm install --save-dev enzyme enzyme-adapter-react-16 react-test-renderer

Linting with ESLint

The lint configuration built into CRA was extended with the AirBnB configuration based on this blog post. Using ESLint outside of react-scripts may not be supported, but appears to work.

The configuration was installed with:

npx install-peerdeps --dev eslint-config-airbnb

And the client .eslintrc.json file configured to use the AirBnB rules, and globally configured to allow JSX in .js files.

{
  "extends": "airbnb",
  "env": {
    "browser": true,
    "jest": true
  },
  "rules": {
    "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]
  }
}

Other rules are disabled in specific files.

The linter is run automatically by the CRA development server, or can be run manually with npx eslint . (or via npm run lint). Include the --fix option to eslint to automatically fix many formatting errors.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published